Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1587953
| From | Shaohua Li <shli@fb.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH V5 5/6] mm: enable MADV_FREE for swapless system |
| Date | 2017-02-24 22:40 +0100 |
| Message-ID | <tevKO-693-23@gated-at.bofh.it> (permalink) |
| References | <tevKN-693-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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@suse.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Hugh Dickins <hughd@google.com> Cc: Rik van Riel <riel@redhat.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Andrew Morton <akpm@linux-foundation.org> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Shaohua Li <shli@fb.com> --- mm/madvise.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/mm/madvise.c b/mm/madvise.c index 225af7d..5ab4b7b 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -612,13 +612,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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH V5 5/6] mm: enable MADV_FREE for swapless system Shaohua Li <shli@fb.com> - 2017-02-24 22:40 +0100 Re: [PATCH V5 5/6] mm: enable MADV_FREE for swapless system Michal Hocko <mhocko@kernel.org> - 2017-02-27 16:30 +0100 Re: [PATCH V5 5/6] mm: enable MADV_FREE for swapless system "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2017-02-28 04:30 +0100 Re: [PATCH V5 5/6] mm: enable MADV_FREE for swapless system Minchan Kim <minchan@kernel.org> - 2017-02-28 06:10 +0100
csiph-web