[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1b6dfc95bba69aa53e4e84eebf6af60f0b9ed95c.camel@redhat.com>
Date: Thu, 20 Jun 2019 16:06:02 -0500
From: Scott Wood <swood@...hat.com>
To: paulmck@...ux.ibm.com
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
Juri Lelli <juri.lelli@...hat.com>,
Clark Williams <williams@...hat.com>,
linux-rt-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RT 1/4] rcu: Acquire RCU lock when disabling BHs
On Thu, 2019-06-20 at 13:53 -0700, Paul E. McKenney wrote:
> On Tue, Jun 18, 2019 at 08:19:05PM -0500, Scott Wood wrote:
> > diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> > index fb267bc04fdf..aca4e5e25ace 100644
> > --- a/include/linux/rcupdate.h
> > +++ b/include/linux/rcupdate.h
> > @@ -637,10 +637,12 @@ static inline void rcu_read_unlock(void)
> > static inline void rcu_read_lock_bh(void)
> > {
> > local_bh_disable();
> > +#ifndef CONFIG_PREEMPT_RT_FULL
>
> How about this instead?
>
> if (IS_ENABLED(CONFIG_PREEMPT_RT_FULL))
> return;
OK.
> > @@ -189,8 +193,10 @@ void __local_bh_enable_ip(unsigned long ip,
> > unsigned int cnt)
> > WARN_ON_ONCE(count < 0);
> > local_irq_enable();
> >
> > - if (!in_atomic())
> > + if (!in_atomic()) {
> > + rcu_read_unlock();
> > local_unlock(bh_lock);
> > + }
> >
> > preempt_check_resched();
> > }
>
> And I have to ask...
>
> What did you do to test this change to kernel/softirq.c? My past attempts
> to do this sort of thing have always run afoul of open-coded BH
> transitions.
Mostly rcutorture and loads such as kernel builds, on a debug kernel. By
"open-coded BH transition" do you mean directly manipulating the preempt
count? That would already be broken on RT.
-Scott
Powered by blists - more mailing lists