Re: [PATCH 56 of 66] transhuge isolate_migratepages()

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

 



On Wed, Nov 03, 2010 at 04:28:31PM +0100, Andrea Arcangeli wrote:
> From: Andrea Arcangeli <aarcange@xxxxxxxxxx>
> 
> It's not worth migrating transparent hugepages during compaction. Those
> hugepages don't create fragmentation.
> 
> Signed-off-by: Andrea Arcangeli <aarcange@xxxxxxxxxx>

Acked-by: Mel Gorman <mel@xxxxxxxxx>

I think this will collide with my compaction series because of the "fast
scanning" patch but the resolution should be trivial. Your check still should
go in after the PageLRU check and the PageTransCompound check should still
be after __isolate_lru_page.

> ---
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -272,10 +272,25 @@ static unsigned long isolate_migratepage
>  		if (PageBuddy(page))
>  			continue;
>  
> +		if (!PageLRU(page))
> +			continue;
> +
> +		/*
> +		 * PageLRU is set, and lru_lock excludes isolation,
> +		 * splitting and collapsing (collapsing has already
> +		 * happened if PageLRU is set).
> +		 */
> +		if (PageTransHuge(page)) {
> +			low_pfn += (1 << compound_order(page)) - 1;
> +			continue;
> +		}
> +
>  		/* Try isolate the page */
>  		if (__isolate_lru_page(page, ISOLATE_BOTH, 0) != 0)
>  			continue;
>  
> +		VM_BUG_ON(PageTransCompound(page));
> +
>  		/* Successfully isolated */
>  		del_page_from_lru_list(zone, page, page_lru(page));
>  		list_add(&page->lru, migratelist);
> 

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.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]