Re: [RFC][PATCH] module: Optimize __module_address() using a latched RB-tree

From: Paul E. McKenney
Date: Mon Mar 02 2015 - 11:58:26 EST


On Mon, Mar 02, 2015 at 10:24:40AM +0100, Peter Zijlstra wrote:
> On Sat, Feb 28, 2015 at 03:32:03PM -0800, Paul E. McKenney wrote:
> > Whew!
> >
> > Though otherwise whatever you were doing would have been pretty cool
> > and fun to learn about. ;-)
>
> So I think I can do that; where readers and writers are fully separated,
> but it requires:
>
> - tripple latch
> - copy operator
> - nested RCU
>
> And the result would be horribly expensive (mostly due to the copy
> operator on dynamic data structures) on the update side, which severely
> limits the applicability of the scheme.

True enough, if you have a single pointer to an RCU-protected data
structure, you can update anything in any way by doing a deep copy of
the original, updating, and swapping pointers. And what is a little
copy overhead among friends? ;-)

Thanx, Paul

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/