[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YXbnV8wbrL5LEZZP@slm.duckdns.org>
Date: Mon, 25 Oct 2021 07:20:23 -1000
From: Tejun Heo <tj@...nel.org>
To: Boqun Feng <boqun.feng@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
Lai Jiangshan <jiangshanlai@...il.com>,
"Paul E . McKenney" <paulmck@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <frederic@...nel.org>,
Jonathan Corbet <corbet@....net>,
Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH v2] workqueue: doc: Call out the non-reentrance conditions
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@...radead.org>
> Suggested-by: Tejun Heo <tj@...nel.org>
> Signed-off-by: Boqun Feng <boqun.feng@...il.com>
Applied to wq/for-5.16.
Thanks.
--
tejun
Powered by blists - more mailing lists