On 1/18/19 5:49 AM, Linus Torvalds wrote: > On Fri, Jan 18, 2019 at 9:45 AM Vlastimil Babka <vbabka@xxxxxxx> wrote: >> >> Or maybe we could resort to the 5.0-rc1 page table check (that is now being >> reverted) but only in cases when we are not allowed the page cache residency >> check? Or would that be needlessly complicated? > > I think it would be good fallback semantics, but I'm not sure it's > worth it. Have you tried writing a patch for it? I don't think you'd > want to do the check *when* you find a hole, so you'd have to do it > upfront and then pass the cached data down with the private pointer > (or have a separate "struct mm_walk" structure, perhaps? > > So I suspect we're better off with the patch we have. But if somebody > *wants* to try to do that fancier patch, and it doesn't look > horrendous, I think it might be the "quality" solution. I thought to drop the idea because of leaking that page has been evicted, but then I realized there are other ways to check for that anyway in /proc. So I'll try, but probably not until after next week. If somebody else wants to, they are welcome. As you say, the current solution should be ok, so that would be a patch on top anyway, for bisectability etc. Vlastimil > Linus >