Messages in this thread | | | Date | Tue, 5 May 2015 12:51:02 +0200 | From | Peter Zijlstra <> | 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..
| |