Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

From: Tim Chen
Date: Fri May 02 2014 - 14:06:23 EST


On Thu, 2014-05-01 at 11:38 -0700, Davidlohr Bueso wrote:
> On Thu, 2014-05-01 at 10:50 -0700, Tim Chen wrote:
> > It takes me a while to understand how rwsem's count field mainifest
> > itself in different scenarios. I'm adding comments to provide a quick
> > reference on the the rwsem's count field for each scenario where readers
> > and writers are contending/holding the lock. Hopefully it will be useful
> > for future maintenance of the code and for people to get up to speed on
> > how the logic in the code works.
>
> Agreed, this is nice to have. I'm planning on sending a minor set of
> patches for rwsem once the optistic spinning stuff is taken. To simplify
> things, I can take this in the series and resend along with the others.

I'm fine with whichever way is more convenient for Peter or Ingo.

Thanks.

Tim



--
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/