Nick Piggin wrote: > What would be wrong with an array of NR_CPUS rwsems? The only > tiny trick you would have to do AFAIKS is have up_read remember > what rwsem down_read took, but that could be returned from > down_read as a token. Here's something to start with. Add initialisers / cacheline alignment / percpu_alloc to taste. For bonus points I guess you could change the implementation to just a single waitqueue mechanism with NR_CPUs counters. In fact, it probably needs quite a bit of work before it is mainline-worthy, but as a proof of concept - do you see anything wrong with it? Nick -- SUSE Labs, Novell Inc.