On Tue, Dec 5, 2017 at 4:16 AM, Catalin Marinas <catalin.marinas@xxxxxxx> wrote: > > I would be more in favour of some heuristics to dynamically reduce the > fault-around bytes based on the memory pressure rather than choosing > between young or old ptes. Or, if we are to go with old vs young ptes, > make this choice dependent on the memory pressure regardless of whether > the CPU supports hardware accessed bit. That sounds like a good idea, but possibly a bit _too_ smart for something that likely isn't a big deal. The current behavior definitely is based on a "swapping is not a big deal" mindset, and that getting the best LRU isn't worth it. That's probably true in most circumstances, but if you really do have low memory, and you really do have fairly random access behavior that where the actual working set size is close to the actual memory size, then a "get rid of faultaround pages earlier" mode would be a good thing. So I'm not at all against your idea - it sounds like the RightThing(tm) to do - I just wonder how painful it is to generate a sane heuristic that actually works in practice.. Linus -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>