diff options
author | Christoph Lameter <cl@gentwo.org> | 2011-10-31 20:09:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-31 20:30:50 -0400 |
commit | df9d6985be2a7e7683c46e4c6ea608fc69f02b45 (patch) | |
tree | 81bcf7cfbc842a7eee7aa18104a1fbecd2d316e8 /mm | |
parent | e0c23279c9f800c403f37511484d9014ac83adec (diff) |
mm: do not drain pagevecs for mlockall(MCL_FUTURE)
MCL_FUTURE does not move pages between lru list and draining the LRU per
cpu pagevecs is a nasty activity. Avoid doing it unecessarily.
Signed-off-by: Christoph Lameter <cl@gentwo.org>
Cc: David Rientjes <rientjes@google.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Johannes Weiner <jweiner@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mlock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/mlock.c b/mm/mlock.c index 048260c4e02e..7debb4fdf79b 100644 --- a/mm/mlock.c +++ b/mm/mlock.c | |||
@@ -549,7 +549,8 @@ SYSCALL_DEFINE1(mlockall, int, flags) | |||
549 | if (!can_do_mlock()) | 549 | if (!can_do_mlock()) |
550 | goto out; | 550 | goto out; |
551 | 551 | ||
552 | lru_add_drain_all(); /* flush pagevec */ | 552 | if (flags & MCL_CURRENT) |
553 | lru_add_drain_all(); /* flush pagevec */ | ||
553 | 554 | ||
554 | down_write(¤t->mm->mmap_sem); | 555 | down_write(¤t->mm->mmap_sem); |
555 | 556 | ||