* [patch 050/102] mm: remove SWAP_MLOCK check for SWAP_SUCCESS in ttu
@ 2017-05-03 21:54 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2017-05-03 21:54 UTC (permalink / raw)
To: akpm, hannes, hillf.zj, khandual, kirill.shutemov, mhocko,
minchan, mm-commits, n-horiguchi, torvalds, vbabka
From: Minchan Kim <minchan@kernel.org>
Subject: mm: remove SWAP_MLOCK check for SWAP_SUCCESS in ttu
If the page is mapped and rescue in try_to_unmap_one, page_mapcount(page)
== 0 cannot be true so page_mapcount check in try_to_unmap is enough to
return SWAP_SUCCESS. IOW, SWAP_MLOCK check is redundant so remove it.
Link: http://lkml.kernel.org/r/1489555493-14659-4-git-send-email-minchan@kernel.org
Signed-off-by: Minchan Kim <minchan@kernel.org>
Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/rmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN mm/rmap.c~mm-remove-swap_mlock-check-for-swap_success-in-ttu mm/rmap.c
--- a/mm/rmap.c~mm-remove-swap_mlock-check-for-swap_success-in-ttu
+++ a/mm/rmap.c
@@ -1535,7 +1535,7 @@ int try_to_unmap(struct page *page, enum
else
ret = rmap_walk(page, &rwc);
- if (ret != SWAP_MLOCK && !page_mapcount(page))
+ if (!page_mapcount(page))
ret = SWAP_SUCCESS;
return ret;
}
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-05-03 21:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-03 21:54 [patch 050/102] mm: remove SWAP_MLOCK check for SWAP_SUCCESS in ttu akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).