Re: [rfc] "fair" rw spinlocks

Arnd Bergmann
2009-12-01T17:04:09Z

On Monday 30 November 2009, Linus Torvalds wrote:
> The best option really would be to try to make it all use RCU, rather than
> paper over things. That really should improve performance.

Are there any writers at interrupt time? If not, another option might be
to first convert all the readers that can happen from interrupts to RCU,
which lets us get rid of the irq disable in the write path.

Step two could either be the conversion of all nested readers to RCU,
or your tasklist_read_lock(), which should then be safe. Doing both of
these lets us turn tasklist_lock into a plain spinlock, possibly followed
by converting remaining readers that show measurable lock contention.