[lttng-dev] userspace rcu flavor improvements
Paul E. McKenney
paulmck at linux.vnet.ibm.com
Mon Nov 19 11:23:07 EST 2012
On Mon, Nov 19, 2012 at 03:52:18PM +0800, Lai Jiangshan wrote:
> On 11/18/2012 12:16 AM, Mathieu Desnoyers wrote:
> > Here are a couple of improvements for all userspace RCU flavors. Many
> > thanks to Alan Stern for his suggestions.
>
> It makes urcu like SRCU. (sync_rcu = check zero + flip + check zero)
> If I have time, I may port more SRCU code to urcu.
I am sure that this is obvious to everyone, but I cannot help restating
it. There is one important difference between user code and kernel code,
though. In the kernel, we track by CPU, so one of SRCU's big jobs is
to track multiple tasks using the same CPU. This opens the possibility
of preemption, which is one of the things that complicates SRCU's design.
In contrast, user-mode RCU tracks tasks without multiplexing. This
allows simplifications that are similar to those that could be achieved
in the kernel if we were willing to disable preemption across the entire
SRCU read-side critical section.
So although I am all for user-mode RCU taking advantage of any technology
we have at hand, we do need to be careful to avoid needless complexity.
> > Patch 8/8 is only done for qsbr so far, and proposed as RFC. I'd like to
> > try and benchmark other approaches to concurrent grace periods too.
The concurrent grace periods are the big win, in my opinion. ;-)
Thanx, Paul
> > Feedback is welcome,
> >
> > Thanks,
> >
> > Mathieu
> >
> >
>
More information about the lttng-dev
mailing list