Re: [RFC 08/26] mm, slub: restructure new page checks in ___slab_alloc()

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

 



On Tue, May 25, 2021 at 01:39:28AM +0200, Vlastimil Babka wrote:
> When we allocate slab object from a newly acquired page (from node's partial
> list or page allocator), we usually also retain the page as a new percpu slab.
> There are two exceptions - when pfmemalloc status of the page doesn't match our
> gfp flags, or when the cache has debugging enabled.
> 
> The current code for these decisions is not easy to follow, so restructure it
> and add comments. No functional change.
> 
> Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
>
> <SNIP>
>
> +	if (unlikely(!pfmemalloc_match(page, gfpflags)))
> +		/*
> +		 * For !pfmemalloc_match() case we don't load freelist so that
> +		 * we don't make further mismatched allocations easier.
> +		 */
> +		goto return_single;
> +
> +	goto load_freelist;
> +
> +return_single:
>  

This looked odd to me but I see other stuff goes between the two goto's
later in the series so

Acked-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>

-- 
Mel Gorman
SUSE Labs




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

  Powered by Linux