[lkml]   [2020]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/2] mm/madvise: teach MADV_PAGEOUT about swap cache
MADV_PAGEOUT ignores swap cache pages which are not mapped
into the calling process. That's nasty because it means that
some of the most easily reclaimable pages are inaccessible to
a mechanism designed to reclaim pages.

This all turned out to be a bit nastier and more complicated
than I would have liked. This has been lightly tested, but I
did pass a normal barrage of compile tests.

I rigged up a little test program to try to create these
situations. Basically, if the parent "reader" RSS changes
in response to MADV_PAGEOUT actions in the child, there is
a problem.

I'd add this to selftests, but it *requires* swap to work
and its parsing of /proc/self/maps is quite icky.

P.S. mincore() really doesn't work at all in this situation,
probably something we need to look at too.

Cc: Michal Hocko <>
Cc: Jann Horn <>
Cc: Vlastimil Babka <>
Cc: Minchan Kim <>
Cc: Daniel Colascione <>
Cc: "Joel Fernandes (Google)" <>
Cc: Andrew Morton <>

 \ /
  Last update: 2020-03-24 00:43    [W:0.056 / U:2.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site