Messages in this thread | ![/](/images/icornerl.gif) | | Date | Mon, 26 Apr 2010 16:06:03 +0200 | From | Oleg Nesterov <> | Subject | Re: [PATCH 7/9] PM: Add suspend blocking work. |
| |
On 04/23, Arve Hjønnevåg wrote: > > On Fri, Apr 23, 2010 at 5:20 AM, Oleg Nesterov <oleg@redhat.com> wrote: > > > The unblock code in run_workqueue() is racy, > > it can unblock after the work was queued on another CPU, cwq->lock can't > > help. > > If the work is both queued and starts running on another workqueue > between "get_wq_data(work) == cwq" and "!work_pending(work)", then > suspend_unblock will be called when it shouldn't. It should work fine > if I change to it check pending first though, since it cannot move > back to the current workqueue without locking cwq->lock first.
It can be queued on the same or different workqueue on another CPU, right before run_workqueue() does unblock.
But I guess this doesn't matter. You already discussed this all with Tejun while I was sleeping ;) And I agree very much, the new plan looks much better imho.
Oleg.
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |