On Thu, Dec 10, 2020 at 2:01 AM Junxiao Bi <junxiao.bi@xxxxxxxxxx <mailto:junxiao.bi@xxxxxxxxxx>> wrote:We already had a lot of customer cases. It made no sense to leave so many negative dentry in the system, it caused memory fragmentation and not much benefit.
Hi Konstantin,
We tested this patch set recently and found it limiting negative
dentry
to a small part of total memory. And also we don't see any
performance
regression on it. Do you have any plan to integrate it into
mainline? It
will help a lot on memory fragmentation issue causing by dentry slab,
there were a lot of customer cases where sys% was very high since
most
cpu were doing memory compaction, dentry slab was taking too much
memory
and nearly all dentry there were negative.
Right now I don't have any plans for this. I suspect such problems will
appear much more often since machines are getting bigger.
So, somebody will take care of it.
That would add new field to dentry?
First part which collects negative dentries at the end list of siblings could be
done in a more obvious way by splitting the list in two.
But this touches much more code.
Last patch isn't very rigid but does non-trivial changes.
Probably it's better to call some garbage collector thingy periodically.
Lru list needs pressure to age and reorder entries properly.
Gc could be off by default or thresholds set very high (50% of ram for example).
Final setup could be left up to owners of large systems, which needs fine tuning.