Re: [PATCH for 2.5] preemptible kernel

Rusty Russell
2001-03-23T12:44:15Z

In message <15032.30533.638717.696704@pizda.ninka.net> you write:
>
> Keith Owens writes:
> > Or have I missed something?
>
> Nope, it is a fundamental problem with such kernel pre-emption
> schemes. As a result, it would also break our big-reader locks
> (see include/linux/brlock.h).

Good point: holding a brlock has to block preemption, as per spinlocks.

> Basically, anything which uses smp_processor_id() would need to
> be holding some lock so as to not get pre-empted.

When I audited the uses of smp_processor_id() for the hotplug cpu
stuff, there were surprisingly few calls to smp_processor_id(), and
most of these will be holding a brlock, so OK already.

Rusty.
--
Premature optmztion is rt of all evl. --DK