mm/madvise: teach MADV_PAGEOUT about swap cache
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | mm/madvise: help MADV_PAGEOUT to find swap cache pagesmm/ | +57 | 1 reply | |
| 2/2 | mm/madvise: skip MADV_PAGEOUT on shared swap cache pagesmm/ | +29 | 3 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Minchan Kim |
|---|---|
| 1/2 | A-b |
| 2/2 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [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.
https://www.sr71.net/~dave/intel/madv-pageout.c
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.