Hugh Dickins 9e16b7fb1d mm,ksm: swapoff might need to copy
Before establishing that KSM page migration was the cause of my
WARN_ON_ONCE(page_mapped(page))s, I suspected that they came from the
lack of a ksm_might_need_to_copy() in swapoff's unuse_pte() - which in
many respects is equivalent to faulting in a page.

In fact I've never caught that as the cause: but in theory it does at
least need the KSM_RUN_UNMERGE check in ksm_might_need_to_copy(), to
avoid bringing a KSM page back in when it's not supposed to be.

I intended to copy how it's done in do_swap_page(), but have a strong
aversion to how "swapcache" ends up being used there: rework it with
"page != swapcache".

Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Petr Holasek <pholasek@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Izik Eidus <izik.eidus@ravellosystems.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-23 17:50:23 -08:00
..
2012-05-29 23:28:33 -04:00
2012-01-03 22:54:56 -05:00
2013-02-23 17:50:21 -08:00
2011-07-26 16:49:47 -07:00
2013-02-23 17:50:21 -08:00
2013-02-23 17:50:18 -08:00
2010-05-21 18:31:21 -04:00
2012-06-20 14:39:36 -07:00
2013-02-23 17:50:23 -08:00
2012-12-18 15:02:14 -08:00
2012-12-18 15:02:14 -08:00
2013-02-23 17:50:18 -08:00
2013-02-23 17:50:18 -08:00
2013-02-23 17:50:23 -08:00
2012-12-20 18:46:29 -05:00
2013-02-23 17:50:21 -08:00