Re: [PATCH v2] locking/rwbase: Prevent indefinite writer starvation

From: Sebastian Andrzej Siewior
Date: Thu Jan 19 2023 - 11:36:34 EST


On 2023-01-19 21:59:03 [+0800], Hillf Danton wrote:
> On Thu, 19 Jan 2023 09:32:22 +0100 Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> >
> > As far as Mel's efforts go, I am satisfied so far.
>
> If not because you can, could you specify why 4ms fails to cure starvation?

It does not fail to cure the starvation. I haven't tested it myself but
base on Mel's description and the patch it very much looks like it cures
the writer starvation.

If you don't like the 4ms, it could be 1ms or 40ms - it does not really
matter. The 4ms is aligned on the generic implementation which uses the
same value. Unless there is strong evidence to use something else I
don't see the need to diverse.

Sebastian