linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: paulmck@linux.vnet.ibm.com
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: 2.6.39-rc6-mmotm0506 - lockdep splat in RCU code on page fault
Date: Wed, 11 May 2011 19:11:34 -0400	[thread overview]
Message-ID: <34783.1305155494@localhost> (raw)
In-Reply-To: Your message of "Tue, 10 May 2011 01:20:29 PDT." <20110510082029.GF2258@linux.vnet.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1324 bytes --]

On Tue, 10 May 2011 01:20:29 PDT, "Paul E. McKenney" said:

Would test, but it doesn't apply cleanly to my -mmotm0506 tree:

> diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> index 5616b17..20c22c5 100644
> --- a/kernel/rcutree.c
> +++ b/kernel/rcutree.c
> @@ -1525,13 +1525,15 @@ static void rcu_cpu_kthread_setrt(int cpu, int to_rt)
>   */
>  static void rcu_cpu_kthread_timer(unsigned long arg)
>  {
> -	unsigned long flags;
> +	unsigned long old;
> +	unsigned long new;
>  	struct rcu_data *rdp = per_cpu_ptr(rcu_state->rda, arg);
>  	struct rcu_node *rnp = rdp->mynode;
>  
> -	raw_spin_lock_irqsave(&rnp->lock, flags);
> -	rnp->wakemask |= rdp->grpmask;
> -	raw_spin_unlock_irqrestore(&rnp->lock, flags);
> +	do {
> +		old = rnp->wakemask;
> +		new = old | rdp->grpmask;
> +	} while (cmpxchg(&rnp->wakemask, old, new) != old);
>  	invoke_rcu_node_kthread(rnp);
>  }

My source has this:

        raw_spin_lock_irqsave(&rnp->lock, flags);
        rnp->wakemask |= rdp->grpmask;
        invoke_rcu_node_kthread(rnp);
        raw_spin_unlock_irqrestore(&rnp->lock, flags);

the last 2 lines swapped from what you diffed against.  I can easily work around
that, except it's unclear what the implications of the invoke_rcu moving outside
of the irq save/restore pair (or if it being inside is the actual root cause)...


[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]

  parent reply	other threads:[~2011-05-11 23:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-10  1:04 2.6.39-rc6-mmotm0506 - lockdep splat in RCU code on page fault Valdis.Kletnieks
2011-05-10  8:20 ` Paul E. McKenney
2011-05-10  8:57   ` Ingo Molnar
2011-05-10 16:21     ` Paul E. McKenney
2011-05-10 20:44       ` Ingo Molnar
2011-05-11  7:44         ` Paul E. McKenney
2011-05-11 23:11   ` Valdis.Kletnieks [this message]
2011-05-12  9:47     ` Paul E. McKenney
2011-05-12 16:05       ` Valdis.Kletnieks
2011-05-13  7:18         ` Paul E. McKenney

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=34783.1305155494@localhost \
    --to=valdis.kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.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).