|
Message-ID: <CAEXW_YTsT5BY5Qbc6Jju2XmbHSQFELrGM9UaPPXY-ETmJaBrsA@mail.gmail.com> Date: Wed, 5 Jun 2019 09:04:44 -0400 From: Joel Fernandes <joel@...lfernandes.org> To: Daniel Jordan <daniel.m.jordan@...cle.com> Cc: LKML <linux-kernel@...r.kernel.org>, Alexey Kuznetsov <kuznet@....inr.ac.ru>, Bjorn Helgaas <bhelgaas@...gle.com>, Borislav Petkov <bp@...en8.de>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>, "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>, Josh Triplett <josh@...htriplett.org>, Kees Cook <keescook@...omium.org>, Kernel Hardening <kernel-hardening@...ts.openwall.com>, Lai Jiangshan <jiangshanlai@...il.com>, Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org, linux-pci@...r.kernel.org, Linux PM <linux-pm@...r.kernel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Neil Brown <neilb@...e.com>, netdev <netdev@...r.kernel.org>, Oleg Nesterov <oleg@...hat.com>, "Paul E. McKenney" <paulmck@...ux.ibm.com>, Pavel Machek <pavel@....cz>, Peter Zilstra <peterz@...radead.org>, "Rafael J. Wysocki" <rjw@...ysocki.net>, rcu <rcu@...r.kernel.org>, Steven Rostedt <rostedt@...dmis.org>, Tejun Heo <tj@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org> Subject: Re: [RFC 4/6] workqueue: Convert for_each_wq to use built-in list check On Tue, Jun 4, 2019 at 9:25 PM Daniel Jordan <daniel.m.jordan@...cle.com> wrote: > > On Sat, Jun 01, 2019 at 06:27:36PM -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 explictly > > checking in the caller. > > > > Signed-off-by: Joel Fernandes (Google) <joel@...lfernandes.org> > > --- > > kernel/workqueue.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/kernel/workqueue.c b/kernel/workqueue.c > > index 9657315405de..91ed7aca16e5 100644 > > --- a/kernel/workqueue.c > > +++ b/kernel/workqueue.c > > @@ -424,9 +424,8 @@ static void workqueue_sysfs_unregister(struct workqueue_struct *wq); > > * ignored. > > */ > > #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)) > > > > I think the definition of assert_rcu_or_wq_mutex can also be deleted. Sure, will do. Thank you.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.