Re: 8-CPU (SMP) #s for lockfree rtcache

Alan Cox
2002-05-28T17:08:30Z

On Tue, 2002-05-28 at 17:34, Andi Kleen wrote:
> And gain tons of new atomic_incs and decs everywhere in the process?
> I would prefer RCU.

RCU is a great way to make sure people get module unloading *wrong*. It
has to be simple for the driver authors. The odd locked operation on
things like open() of a device file is not a performance issue, not
remotely.

Lots of people write drivers, many of them not SMP kernel locking gurus
who have time to understand RCU and when they can or cannot sleep, and
what happens if their unload is pre-empted and RCU is in use. The kernel
core has to provide a clean easy interface. The network code is a superb
example of this. All the hard thinking is done outside of the driver, at
least unless you choose to join in that thinking to get the last scraps
of performance.

Alan