Re: [PATCH RFC 8/8] dcache: prevent flooding with negative dentries

2020-05-08 Thread Waiman Long
On 5/8/20 8:23 AM, Konstantin Khlebnikov wrote: Without memory pressure count of negative dentries isn't bounded. They could consume all memory and drain all other inactive caches. Typical scenario is an idle system where some process periodically creates temporary files and removes them. After

Re: [PATCH RFC 8/8] dcache: prevent flooding with negative dentries

2020-05-08 Thread Konstantin Khlebnikov
On 08/05/2020 17.56, Matthew Wilcox wrote: On Fri, May 08, 2020 at 03:23:33PM +0300, Konstantin Khlebnikov wrote: This patch implements heuristic which detects such scenarios and prevents unbounded growth of completely unneeded negative dentries. It keeps up to three latest negative dentry in

Re: [PATCH RFC 8/8] dcache: prevent flooding with negative dentries

2020-05-08 Thread Matthew Wilcox
On Fri, May 08, 2020 at 03:23:33PM +0300, Konstantin Khlebnikov wrote: > This patch implements heuristic which detects such scenarios and prevents > unbounded growth of completely unneeded negative dentries. It keeps up to > three latest negative dentry in each bucket unless they were referenced.

[PATCH RFC 8/8] dcache: prevent flooding with negative dentries

2020-05-08 Thread Konstantin Khlebnikov
Without memory pressure count of negative dentries isn't bounded. They could consume all memory and drain all other inactive caches. Typical scenario is an idle system where some process periodically creates temporary files and removes them. After some time, memory will be filled with negative