Re: [PATCH 64 of 66] scale nr_rotated to balance memory pressure

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

 



> From: Rik van Riel <riel@xxxxxxxxxx>
> 
> Make sure we scale up nr_rotated when we encounter a referenced
> transparent huge page.  This ensures pageout scanning balance
> is not distorted when there are huge pages on the LRU.
> 
> Signed-off-by: Rik van Riel <riel@xxxxxxxxxx>
> Signed-off-by: Andrea Arcangeli <aarcange@xxxxxxxxxx>
> ---
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1259,7 +1259,8 @@ putback_lru_pages(struct zone *zone, str
>  		add_page_to_lru_list(zone, page, lru);
>  		if (is_active_lru(lru)) {
>  			int file = is_file_lru(lru);
> -			reclaim_stat->recent_rotated[file]++;
> +			int numpages = hpage_nr_pages(page);
> +			reclaim_stat->recent_rotated[file] += numpages;
>  		}
>  		if (!pagevec_add(&pvec, page)) {
>  			spin_unlock_irq(&zone->lru_lock);

I haven't seen this patch series carefully yet. So, probably
my question is dumb. Why don't we need to change ->recent_scanned[] too?



> @@ -1535,7 +1536,7 @@ static void shrink_active_list(unsigned 
>  		}
>  
>  		if (page_referenced(page, 0, sc->mem_cgroup, &vm_flags)) {
> -			nr_rotated++;
> +			nr_rotated += hpage_nr_pages(page);
>  			/*
>  			 * Identify referenced, file-backed active pages and
>  			 * give them one more trip around the active list. So



--
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]