Re: mm: Do not drain pagevecs for mlockall(MCL_FUTURE)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(10/7/2011 4:32 PM), Christoph Lameter wrote:
> 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@xxxxxxxxxx>
> 
> 
> ---
>  mm/mlock.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> Index: linux-2.6/mm/mlock.c
> ===================================================================
> --- linux-2.6.orig/mm/mlock.c	2011-10-07 14:57:52.000000000 -0500
> +++ linux-2.6/mm/mlock.c	2011-10-07 15:01:06.000000000 -0500
> @@ -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);

Looks good to me. I guess I introduced this fault. sorry about that.

Acked-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>




--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]