lkml.org 
[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
From
Date
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.

Cc: Michal Hocko <mhocko@suse.com>
Cc: Jann Horn <jannh@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Daniel Colascione <dancol@google.com>
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Cc: Andrew Morton <akpm@linux-foundation.org>

\
 
 \ /
  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