All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Wagner <daniel.wagner@bmw-carit.de>
To: Boqun Feng <boqun.feng@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-rt-users@vger.kernel.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Paul Gortmaker <paul.gortmaker@windriver.com>
Subject: Re: [PATCH tip v4 4/5] rcu: Do not call rcu_nocb_gp_cleanup() while holding rnp->lock
Date: Wed, 25 Nov 2015 11:29:05 +0100	[thread overview]
Message-ID: <56558D71.5050605@bmw-carit.de> (raw)
In-Reply-To: <20151125010118.GB1165@fixme-laptop.cn.ibm.com>

Hi Boqun,

On 11/25/2015 02:01 AM, Boqun Feng wrote:
> On Tue, Nov 24, 2015 at 11:52:12PM +0800, Boqun Feng wrote:
>> Hi Daniel,
>>
>> On Tue, Nov 24, 2015 at 02:03:06PM +0100, Daniel Wagner wrote:
>>> rcu_nocb_gp_cleanup() is called while holding rnp->lock. Currently,
>>> this is okay because the wake_up_all() in rcu_nocb_gp_cleanup() will
>>> not enable the IRQs. lockdep is happy.
>>>
>>> By switching over using swait this is not true anymore. swake_up_all()
>>> enables the IRQs while processing the waiters. __do_softirq() can now
>>> run and will eventually call rcu_process_callbacks() which wants to
>>> grap nrp->lock.
>>>
>>> Let's move the rcu_nocb_gp_cleanup() call outside the lock before we
>>> switch over to swait.
>>>
>>
>> But you did introduce swait in this patch ;-)

Argh, that is a fail. I did build all patches individual but seems like
I haven't got the right configuration.

>> [snip]
>>
>>>
>>> Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
>>> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
>>> Cc: Peter Zijlstra <peterz@infradead.org>
>>> Cc: Thomas Gleixner <tglx@linutronix.de>
>>> Cc: linux-kernel@vger.kernel.org
>>> ---
>>>  kernel/rcu/tree.c        |  4 +++-
>>>  kernel/rcu/tree.h        |  3 ++-
>>>  kernel/rcu/tree_plugin.h | 16 +++++++++++++---
>>>  3 files changed, 18 insertions(+), 5 deletions(-)
>>>
>>
>> So I tried to build this patch with a config having RCU_EXPERT=y and
>> RCU_NOCB_CPU=y, but I got:

Will update my config accordingly.

Thanks,
Daniel

  reply	other threads:[~2015-11-25 10:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 13:03 [PATCH tip v4 0/5] Simple wait queue support Daniel Wagner
2015-11-24 13:03 ` [PATCH tip v4 1/5] wait.[ch]: Introduce the simple waitqueue (swait) implementation Daniel Wagner
2015-11-24 13:03 ` [PATCH tip v4 2/5] [s]wait: Add compile time type check assertion Daniel Wagner
2015-11-26 12:22   ` Daniel Wagner
2015-11-27 20:10     ` Thomas Gleixner
2015-11-24 13:03 ` [PATCH tip v4 3/5] KVM: use simple waitqueue for vcpu->wq Daniel Wagner
2015-11-24 13:03 ` [PATCH tip v4 4/5] rcu: Do not call rcu_nocb_gp_cleanup() while holding rnp->lock Daniel Wagner
2015-11-24 15:52   ` Boqun Feng
2015-11-25  1:01     ` Boqun Feng
2015-11-25 10:29       ` Daniel Wagner [this message]
2015-11-24 13:03 ` [PATCH tip v4 5/5] rcu: use simple wait queues where possible in rcutree Daniel Wagner

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=56558D71.5050605@bmw-carit.de \
    --to=daniel.wagner@bmw-carit.de \
    --cc=boqun.feng@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=paul.gortmaker@windriver.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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.