All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: linux-kernel@vger.kernel.org, laijs@cn.fujitsu.com
Cc: shli@kernel.org, Tejun Heo <tj@kernel.org>
Subject: [PATCH 1/9] workqueue: mark WQ_NON_REENTRANT deprecated
Date: Tue, 30 Jul 2013 08:40:20 -0400	[thread overview]
Message-ID: <1375188028-11910-2-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1375188028-11910-1-git-send-email-tj@kernel.org>

dbf2576e37 ("workqueue: make all workqueues non-reentrant") made
WQ_NON_REENTRANT no-op but the following patches didn't remove the
flag or update the documentation.  Let's mark the flag deprecated and
update the documentation accordingly.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
 Documentation/workqueue.txt | 18 ++++++------------
 include/linux/workqueue.h   |  7 ++++++-
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/Documentation/workqueue.txt b/Documentation/workqueue.txt
index a6ab4b6..67113f6 100644
--- a/Documentation/workqueue.txt
+++ b/Documentation/workqueue.txt
@@ -100,8 +100,8 @@ Subsystems and drivers can create and queue work items through special
 workqueue API functions as they see fit. They can influence some
 aspects of the way the work items are executed by setting flags on the
 workqueue they are putting the work item on. These flags include
-things like CPU locality, reentrancy, concurrency limits, priority and
-more.  To get a detailed overview refer to the API description of
+things like CPU locality, concurrency limits, priority and more.  To
+get a detailed overview refer to the API description of
 alloc_workqueue() below.
 
 When a work item is queued to a workqueue, the target gcwq and
@@ -166,16 +166,6 @@ resources, scheduled and executed.
 
 @flags:
 
-  WQ_NON_REENTRANT
-
-	By default, a wq guarantees non-reentrance only on the same
-	CPU.  A work item may not be executed concurrently on the same
-	CPU by multiple workers but is allowed to be executed
-	concurrently on multiple CPUs.  This flag makes sure
-	non-reentrance is enforced across all CPUs.  Work items queued
-	to a non-reentrant wq are guaranteed to be executed by at most
-	one worker system-wide at any given time.
-
   WQ_UNBOUND
 
 	Work items queued to an unbound wq are served by a special
@@ -233,6 +223,10 @@ resources, scheduled and executed.
 
 	This flag is meaningless for unbound wq.
 
+Note that the flag WQ_NON_REENTRANT no longer exists as all workqueues
+are now non-reentrant - any work item is guaranteed to be executed by
+at most one worker system-wide at any given time.
+
 @max_active:
 
 @max_active determines the maximum number of execution contexts per
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index a0ed78a..594521b 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -295,7 +295,12 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }
  * Documentation/workqueue.txt.
  */
 enum {
-	WQ_NON_REENTRANT	= 1 << 0, /* guarantee non-reentrance */
+	/*
+	 * All wqs are now non-reentrant making the following flag
+	 * meaningless.  Will be removed.
+	 */
+	WQ_NON_REENTRANT	= 1 << 0, /* DEPRECATED */
+
 	WQ_UNBOUND		= 1 << 1, /* not bound to any cpu */
 	WQ_FREEZABLE		= 1 << 2, /* freeze during suspend */
 	WQ_MEM_RECLAIM		= 1 << 3, /* may be used for memory reclaim */
-- 
1.8.3.1


  reply	other threads:[~2013-07-30 12:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-30 12:40 [PATCHSET wq/for-3.12] workqueue: WQ_NON_REENTRANT is meaningless and going away Tejun Heo
2013-07-30 12:40 ` Tejun Heo [this message]
2013-07-31  6:12   ` [PATCH 1/9] workqueue: mark WQ_NON_REENTRANT deprecated Lai Jiangshan
2013-07-30 12:40 ` [PATCH 2/9] dm: WQ_NON_REENTRANT is meaningless and going away Tejun Heo
2013-07-30 12:40 ` [PATCH 3/9] mmc: " Tejun Heo
2013-07-30 12:40 ` [PATCH 4/9] firewire: " Tejun Heo
2013-07-30 13:52   ` Stefan Richter
2013-07-30 12:40 ` [PATCH 5/9] dlm: " Tejun Heo
2013-07-30 12:40   ` [Cluster-devel] " Tejun Heo
2013-07-30 12:40 ` [PATCH 6/9] gfs2: " Tejun Heo
2013-07-30 12:40   ` [Cluster-devel] " Tejun Heo
2013-07-30 14:10   ` Steven Whitehouse
2013-07-30 14:10     ` [Cluster-devel] " Steven Whitehouse
2013-07-30 12:40 ` [PATCH 7/9] xfs: " Tejun Heo
2013-07-30 12:40   ` Tejun Heo
2013-07-30 18:13   ` Ben Myers
2013-07-30 18:13     ` Ben Myers
2013-07-30 12:40 ` [PATCH 8/9] ceph: " Tejun Heo
2013-07-30 12:40 ` [PATCH 9/9] l2tp: " 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=1375188028-11910-2-git-send-email-tj@kernel.org \
    --to=tj@kernel.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shli@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.