3 ms·
That would require maintaining priority for every page in the cache, or even to process-if a process using the cache page ends, priority should be adjusted. Too
by rini17 6y ago
That would require maintaining priority for every page in the cache, or even to process-if a process using the cache page ends, priority should be adjusted. Too complicated. Better simpler option is that the backup process says "do not cache this". That option is already implemented in kernel and available to userspace.
- pengaru 6y agoHmm yes, unwinding the priorities when processes exit is complicated. But I wonder if simply leaving the priority at its highest level reached would be harmless; it really depends on how much influence the heuristic has. It doesn't strike me as particularly wrong for a page to still be classified as elevated priority if some higher priority process had classified it as such even if that process no longer exists. At least not for file-backed pages, which are really what I'm interested in, in this context. Chances are good the file gets accessed again in a similar fashion, the priority stickiness could help keep it around. The "do not cache this" approach is quite heavy-handed and can be problematic if you want some caching for things like producing deltas, or in the case of a restore from backup reassembling from myriad delta files, without blowing out the page cache. As corbet mentioned the cgroups approach does provide a solution to constrain page cache effects.