Re: [v2 PATCH] rhashtable: Still do rehash when we get EEXIST

From: Josh Elsasser
Date: Wed Jan 23 2019 - 22:40:10 EST


On Jan 23, 2019, at 7:08 PM, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:

> Thanks for catching this!
>
> Although I think we should fix this in a different way. The problem
> here is that the shrink cannot proceed because there was a previous
> rehash that is still incomplete. We should wait for its completion
> and then reattempt a shrinnk should it still be necessary.
>
> So something like this:

SGTM.

I can't test this right now because our VM server's down after a power
outage this evening, but I tried a similar patch that swallowed the
-EEXIST err and even with that oversight the hashtable dodged the
reschedule loop.

- Josh