Skip to content

Commit

Permalink
mm: do not drain pagevecs for mlockall(MCL_FUTURE)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: David Rientjes <[email protected]>
Reviewed-by: Minchan Kim <[email protected]>
Acked-by: KOSAKI Motohiro <[email protected]>
Cc: Mel Gorman <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Christoph Lameter authored and torvalds committed Nov 1, 2011
1 parent e0c2327 commit df9d698
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mm/mlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,8 @@ SYSCALL_DEFINE1(mlockall, int, flags)
if (!can_do_mlock())
goto out;

lru_add_drain_all(); /* flush pagevec */
if (flags & MCL_CURRENT)
lru_add_drain_all(); /* flush pagevec */

down_write(&current->mm->mmap_sem);

Expand Down

0 comments on commit df9d698

Please sign in to comment.