Re: [rfc] "fair" rw spinlocks

From: Nick Piggin
Date: Mon Nov 30 2009 - 02:57:52 EST


On Sun, Nov 29, 2009 at 10:51:22AM -0800, Paul E. McKenney wrote:
> On Sat, Nov 28, 2009 at 09:30:18AM -0800, Linus Torvalds wrote:
> > So as far as I can tell, we have only one real user of rwlocks where
> > livelocks might be relevant, but that one real user absolutely _requires_
> > the unfair behavior.
>
> But the required unfairness is limited to unconditionally granting
> recursive read requests, right? If I understand correctly, if a given
> CPU does not already read-hold the lock, then we can safely make that
> CPU wait for a writer that might otherwise be starved. Again, is there
> another requirement that I am missing?

I think this is the only ordering requirement.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/