Re: [PATCH] mm: page_idle_get_page() does not need zone_lru_lock

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

 



On 12/06/2016 06:55 AM, Hugh Dickins wrote:
> Rechecking PageLRU() after get_page_unless_zero() may have value, but
> holding zone_lru_lock around that serves no useful purpose: delete it.
> 
> Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx>

Acked-by: Vlastimil Babka <vbabka@xxxxxxx>

> ---
> 
>  mm/page_idle.c |    4 ----
>  1 file changed, 4 deletions(-)
> 
> --- 4.9-rc8/mm/page_idle.c	2016-10-02 16:24:33.000000000 -0700
> +++ linux/mm/page_idle.c	2016-12-05 19:44:32.646625435 -0800
> @@ -30,7 +30,6 @@
>  static struct page *page_idle_get_page(unsigned long pfn)
>  {
>  	struct page *page;
> -	struct zone *zone;
>  
>  	if (!pfn_valid(pfn))
>  		return NULL;
> @@ -40,13 +39,10 @@ static struct page *page_idle_get_page(u
>  	    !get_page_unless_zero(page))
>  		return NULL;
>  
> -	zone = page_zone(page);
> -	spin_lock_irq(zone_lru_lock(zone));
>  	if (unlikely(!PageLRU(page))) {
>  		put_page(page);
>  		page = NULL;
>  	}
> -	spin_unlock_irq(zone_lru_lock(zone));
>  	return page;
>  }
>  
> 
> --
> 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/ .
> Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>
> 

--
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/ .
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 OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]