lkml.org 
[lkml]   [2012]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 11/25] pm: don't use [delayed_]work_pending()
Hello, Rafael.

On Sat, Dec 22, 2012 at 12:53:29PM +0100, Rafael J. Wysocki wrote:
> On Friday, December 21, 2012 05:57:01 PM Tejun Heo wrote:
> > There's no need to test whether a (delayed) work item in pending
> > before queueing, flushing or cancelling it. Most uses are unnecessary
> > and quite a few of them are buggy.
>
> Can you please say why they are buggy?

Usually one of the following two reasons.

* The user gets confused and fails to handle !PENDING && currently
executing properly.

* work_pending() doesn't have any memory barrier and the caller
assumes work_pending() is somehow properly synchronized by itself.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2012-12-25 18:01    [W:0.068 / U:1.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site