[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 5 May 2015 12:51:02 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Rik van Riel <riel@...hat.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Ingo Molnar <mingo@...nel.org>,
Andy Lutomirski <luto@...capital.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
X86 ML <x86@...nel.org>, williams@...hat.com,
Andrew Lutomirski <luto@...nel.org>, fweisbec@...hat.com,
Heiko Carstens <heiko.carstens@...ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"Paul E. McKenney" <paulmck@...ibm.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: question about RCU dynticks_nesting
On Tue, May 05, 2015 at 12:48:34PM +0200, Peter Zijlstra wrote:
> On Mon, May 04, 2015 at 03:00:44PM -0400, Rik van Riel wrote:
> In case of the non-preemptible RCU, we could easily also
> > increase current->rcu_read_lock_nesting at the same time
> > we increase the preempt counter, and use that as the
> > indicator to test whether the cpu is in an extended
> > rcu quiescent state. That way there would be no extra
> > overhead at syscall entry or exit at all. The trick
> > would be getting the preempt count and the rcu read
> > lock nesting count in the same cache line for each task.
>
> Can't do that. Remember, on x86 we have per-cpu preempt count, and your
> rcu_read_lock_nesting is per task.
Hmm, I suppose you could do the rcu_read_lock_nesting thing in a per-cpu
counter too and transfer that into the task_struct on context switch.
If you manage to put both sides of that in the same cache things should
not add significant overhead.
You'd have to move the rcu_read_lock_nesting into the thread_info, which
would be painful as you'd have to go touch all archs etc..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists