[go: up one dir, main page]

|
|
Log in / Subscribe / Register

Negative dentries, 20 years later

Negative dentries, 20 years later

Posted Apr 11, 2022 19:03 UTC (Mon) by dskoll (subscriber, #1630)
In reply to: Negative dentries, 20 years later by willy
Parent article: Negative dentries, 20 years later

Right. I guess limiting the size of the dentry cache so we start evicting before we have general memory pressure is the main idea, but allowing it to expand if by some miracle all entries have been hit so that it scales up if memory is available.


to post comments

Negative dentries, 20 years later

Posted Apr 11, 2022 19:31 UTC (Mon) by willy (subscriber, #9762) [Link] (1 responses)

The idea I'm currently advocating (a little busy with other projects to work on myself) is that after allocating 100 entries, we scan 110 entries at the tail of the list and either return them to the head of the list with their 'referenced' flag cleared, or free them. That allows the cache to both shrink (if <100 have been referenced) and grow (if >100 have been referenced)

Obviously those numbers are a bit magic. Why not 150? Or 200? Needs some experimentation.

Negative dentries, 20 years later

Posted Apr 12, 2022 7:44 UTC (Tue) by geert (subscriber, #98403) [Link]

Why not a power of two? ;-)


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds