lkml.org 
[lkml]   [2021]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 08/26] mm, slub: restructure new page checks in ___slab_alloc()
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@suse.cz>
>
> <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@techsingularity.net>

--
Mel Gorman
SUSE Labs

\
 
 \ /
  Last update: 2021-05-25 14:11    [W:1.774 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site