[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a9119dd81eccddea8175aae6919dd9dc8a79102e.1486163864.git.shli@fb.com>
Date: Fri, 3 Feb 2017 15:33:20 -0800
From: Shaohua Li <shli@...com>
To: <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>
CC: <Kernel-team@...com>, <danielmicay@...il.com>, <mhocko@...e.com>,
<minchan@...nel.org>, <hughd@...gle.com>, <hannes@...xchg.org>,
<riel@...hat.com>, <mgorman@...hsingularity.net>,
<akpm@...ux-foundation.org>
Subject: [PATCH V2 4/7] mm: enable MADV_FREE for swapless system
Now MADV_FREE pages can be easily reclaimed even for swapless system. We
can safely enable MADV_FREE for all systems.
Cc: Michal Hocko <mhocko@...e.com>
Cc: Minchan Kim <minchan@...nel.org>
Cc: Hugh Dickins <hughd@...gle.com>
Cc: Johannes Weiner <hannes@...xchg.org>
Cc: Rik van Riel <riel@...hat.com>
Cc: Mel Gorman <mgorman@...hsingularity.net>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Shaohua Li <shli@...com>
---
mm/madvise.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/mm/madvise.c b/mm/madvise.c
index c24549e..fe40e93 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -579,13 +579,7 @@ madvise_vma(struct vm_area_struct *vma, struct vm_area_struct **prev,
case MADV_WILLNEED:
return madvise_willneed(vma, prev, start, end);
case MADV_FREE:
- /*
- * XXX: In this implementation, MADV_FREE works like
- * MADV_DONTNEED on swapless system or full swap.
- */
- if (get_nr_swap_pages() > 0)
- return madvise_free(vma, prev, start, end);
- /* passthrough */
+ return madvise_free(vma, prev, start, end);
case MADV_DONTNEED:
return madvise_dontneed(vma, prev, start, end);
default:
--
2.9.3
Powered by blists - more mailing lists