On Tue, 2008-06-10 at 21:00 +0400, Oleg Nesterov wrote:
The advantage of creating a more flexible or fine-grained flush is that
large machine also profit from it.
A simple scheme would be creating a workqueue context that is passed
along on enqueue, and then passed to flush.
This context could:
- either track the individual worklets and employ a completion scheme
to wait for them;
- or track on which cpus the worklets are enqueued and flush only those
few cpus.
Doing this would solve your case since nobody (except those having
business) will enqueue something on the isolated cpus.
And it will improve the large machine case for the same reasons - it
won't have to iterate all cpus.
Of course, things that use schedule_on_each_cpu() will still end up
doing things on your isolated cpus, but getting around those would
probably get you into some correctness trouble.
--