From: Tejun Heo <tj@kernel.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH 11/25] pm: don't use [delayed_]work_pending()
Date: Tue, 25 Dec 2012 08:44:33 -0800 [thread overview]
Message-ID: <20121225164433.GG10220@mtj.dyndns.org> (raw)
In-Reply-To: <1652427.IL3F6yol0I@vostro.rjw.lan>
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
next prev parent reply other threads:[~2012-12-25 16:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1356141435-17340-1-git-send-email-tj@kernel.org>
2012-12-22 1:57 ` [PATCH 11/25] pm: don't use [delayed_]work_pending() Tejun Heo
2012-12-22 11:53 ` Rafael J. Wysocki
2012-12-25 16:44 ` Tejun Heo [this message]
2012-12-22 1:57 ` [PATCH 16/25] PM / Domains: " Tejun Heo
2012-12-22 11:57 ` Rafael J. Wysocki
2012-12-25 17:03 ` Tejun Heo
2012-12-25 20:33 ` Rafael J. Wysocki
2012-12-26 1:23 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121225164433.GG10220@mtj.dyndns.org \
--to=tj@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).