Re: [RFC 1/2] rwsem: introduce upgrade_read interface
From: Christoph Hellwig
Date: Wed Oct 16 2024 - 08:21:14 EST
On Wed, Oct 16, 2024 at 12:51:23PM +0100, Matthew Wilcox wrote:
> > It's obviously a try_upgrade_read, right?
>
> Well, that's confusing. "try" usually means "don't sleep", and this
> sleeps. Maybe it shouldn't sleep; ie we make this fail if there's any
> other reader? It'll succeed less often, but it'll be easier to
> understand.
To me try primarily implies that it can fail and the return value
needs to be checked. But I guess it has different implications to
different people.