Re: [PATCH 2/3] work_on_cpu: Use our own workqueue.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/26, Ingo Molnar wrote:
>
> Andrew's suggestion does make sense though: for any not-in-progress
> worklet we can dequeue that worklet and execute it in the flushing
> context. [ And if that worklet cannot be dequeued because it's being
> processed then that's fine and we can wait on that single worklet, without
> waiting on any other 'unrelated' worklets. ]

Yes sure. This is easy, and I am not sure we need the special handler.
If the caller wants this behaviour, it can do:

	if (cancel_work_sync(work))
		work->func(work);

But flush_work() was specially introduced for the case when we can't
do the above,

> That does not help work_on_cpu() though: that facility really uses the
> fact that workqueues are implemented via per CPU threads - hence we cannot
> remove the worklet from the queue and execute it in the flushing context.

Yes.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe cpufreq" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux