Re: [PATCH v3 18/68] fscache: Implement cookie user counting and resource pinning

From: David Howells
Date: Fri Dec 17 2021 - 15:44:10 EST


Jeff Layton <jlayton@xxxxxxxxxx> wrote:

> > +unsigned int fscache_lru_cookie_timeout = 10 * HZ;
> >
>
> Looks like it only pops after 10s? That's a bit more than the "couple of
> seconds" mentioned in the changelog. In fact, that seems like quite a
> long time.
>
> Did you arrive at this value empirically somehow?

It was 2s originally, but I upped for some reason I don't remember. I've left
it as it seems to work, but it is arbitrary. I should make this configurable
perhaps and/or maybe make it based on the number of cookies on the LRU since
the number of open files is what matters.

I don't have a good heuristic, so I'll just fix the commit message for now.

David