What I have in mind is to have 2 separate rwlock initializers - one forThat's definitely a nicer patch, if it will work. I was imagining that,
fair and one for reader-bias behavior. So the lock owners can decide
what behavior do they want with a one line change.
even for a single (type of) lock, only a few uses require reader bias
(because they might be recursive, or are in an interrupt), but you'd
want most read_lock sites to be fair.
Deciding on a per-lock basis means that one potentially recursive callI think so. The queue read/write lock, if merged, will be an optional feature for people to try out to see if they see any problem in any of the existing rwlock. So far, I didn't encounter any problem in my testing.
means you can't use fair queueing anywhere.
I was hoping that the number of necessary unfair calls would
be small enough that making the read_lock default fair and
only marking the unfair call sites would be enough.
But I don't really know until doing a survey of the calls.