From: Tejun Heo <tj@kernel.org>
To: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Cc: linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jonathan Corbet <corbet@lwn.net>,
Josh Triplett <josh@joshtriplett.org>,
Lai Jiangshan <jiangshanlai@gmail.com>,
linux-doc@vger.kernel.org,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
"Paul E. McKenney" <paulmck@linux.ibm.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
rcu@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 1/3] workqueue: Convert for_each_wq to use built-in list check (v2)
Date: Wed, 14 Aug 2019 12:48:41 -0700 [thread overview]
Message-ID: <20190814194841.GA588936@devbig004.ftw2.facebook.com> (raw)
In-Reply-To: <20190811221111.99401-1-joel@joelfernandes.org>
Hello, Joel.
On Sun, Aug 11, 2019 at 06:11:09PM -0400, Joel Fernandes (Google) wrote:
> list_for_each_entry_rcu now has support to check for RCU reader sections
> as well as lock. Just use the support in it, instead of explicitly
> checking in the caller.
>
> Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Acked-by: Tejun Heo <tj@kernel.org>
> #define for_each_pwq(pwq, wq) \
> - list_for_each_entry_rcu((pwq), &(wq)->pwqs, pwqs_node) \
> - if (({ assert_rcu_or_wq_mutex(wq); false; })) { } \
> - else
> + list_for_each_entry_rcu((pwq), &(wq)->pwqs, pwqs_node, \
> + lock_is_held(&(wq->mutex).dep_map))
Why not lockdep_is_held() tho?
Thanks.
--
tejun
next prev parent reply other threads:[~2019-08-14 19:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-11 22:11 [PATCH 1/3] workqueue: Convert for_each_wq to use built-in list check (v2) Joel Fernandes (Google)
2019-08-11 22:11 ` [PATCH 2/3] doc: Update documentation about list_for_each_entry_rcu (v1) Joel Fernandes (Google)
2019-08-12 20:22 ` Paul E. McKenney
2019-08-12 20:42 ` Joel Fernandes
2019-08-12 21:24 ` Paul E. McKenney
2019-08-11 22:11 ` [PATCH 3/3] driver/core: Fix build error when SRCU and lockdep disabled Joel Fernandes (Google)
2019-08-12 5:02 ` Greg Kroah-Hartman
2019-08-12 13:03 ` Joel Fernandes
2019-08-12 18:11 ` Steven Rostedt
2019-08-12 20:01 ` Joel Fernandes
2019-08-12 20:05 ` Steven Rostedt
2019-08-11 22:12 ` [PATCH 1/3] workqueue: Convert for_each_wq to use built-in list check (v2) Joel Fernandes
2019-08-14 19:48 ` Tejun Heo [this message]
2019-08-14 22:42 ` Joel Fernandes
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=20190814194841.GA588936@devbig004.ftw2.facebook.com \
--to=tj@kernel.org \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@linux.ibm.com \
--cc=rafael@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.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;
as well as URLs for NNTP newsgroup(s).