On Mon, 2010-08-23 at 15:44 +0200, Arnd Bergmann wrote:
I've seen drivers in the past do trylocks at interrupt time ... tho I
agree it sucks.
It depends how sensitive rwsems are.
The "generic" variant based on atomic's and cmpxchg on powerpc is
sub-optimal in the sense that it has stronger memory barriers that would
be necessary (atomic_inc_return for example has both acquire and
release).
But that vs. one more pile of inline asm, we decided it wasn't hot
enough a spot for us to care back then.
Cheers,
Ben.
--