mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Boqun Feng <boqun.feng@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	"Paul E . McKenney" <paulmck@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <frederic@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH v2] workqueue: doc: Call out the non-reentrance conditions
Date: Mon, 25 Oct 2021 07:20:23 -1000	[thread overview]
Message-ID: <YXbnV8wbrL5LEZZP@slm.duckdns.org> (raw)
In-Reply-To: <20211022004208.350992-1-boqun.feng@gmail.com>

On Fri, Oct 22, 2021 at 08:42:08AM +0800, Boqun Feng wrote:
> The current doc of workqueue API suggests that work items are
> non-reentrant: any work item is guaranteed to be executed by at most one
> worker system-wide at any given time. However this is not true, the
> following case can cause a work item W executed by two workers at
> the same time:
> 
>         queue_work_on(0, WQ1, W);
>         // after a worker picks up W and clear the pending bit
>         queue_work_on(1, WQ2, W);
>         // workers on CPU0 and CPU1 will execute W in the same time.
> 
> , which means the non-reentrance of a work item is conditional, and
> Lai Jiangshan provided a nice summary[1] of the conditions, therefore
> use it to describe a work item instance and improve the doc.
> 
> [1]: https://lore.kernel.org/lkml/CAJhGHyDudet_xyNk=8xnuO2==o-u06s0E0GZVP4Q67nmQ84Ceg@mail.gmail.com/
> 
> Suggested-by: Matthew Wilcox <willy@infradead.org>
> Suggested-by: Tejun Heo <tj@kernel.org>
> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>

Applied to wq/for-5.16.

Thanks.

-- 
tejun

      reply	other threads:[~2021-10-25 17:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22  0:42 Boqun Feng
2021-10-25 17:20 ` Tejun Heo [this message]

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=YXbnV8wbrL5LEZZP@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=boqun.feng@gmail.com \
    --cc=corbet@lwn.net \
    --cc=frederic@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=willy@infradead.org \
    /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

all inboxes | Powered by JetHome®