[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <9dbd300c-240b-477f-ba03-8a17c7c2b84b@suse.cz>
Date: Fri, 29 Aug 2025 15:08:58 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: yangshiguang <yangshiguang1011@....com>
Cc: Harry Yoo <harry.yoo@...cle.com>, Matthew Wilcox <willy@...radead.org>,
akpm@...ux-foundation.org, cl@...two.org, rientjes@...gle.com,
roman.gushchin@...ux.dev, glittao@...il.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, yangshiguang <yangshiguang@...omi.com>,
stable@...r.kernel.org
Subject: Re: [PATCH v3] mm: slub: avoid wake up kswapd in set_track_prepare
On 8/29/25 13:29, yangshiguang wrote:
> At 2025-08-27 16:40:21, "Vlastimil Babka" <vbabka@...e.cz> wrote:
>
>>>
>>>>
>>>
>>> How about this?
>>>
>>> /* Preemption is disabled in ___slab_alloc() */
>>> - gfp_flags &= ~(__GFP_DIRECT_RECLAIM);
>>> + gfp_flags = (gfp_flags & ~(__GFP_DIRECT_RECLAIM | __GFP_NOFAIL)) |
>>> + __GFP_NOWARN;
>>
>>I'd suggest using gfp_nested_flags() and & ~(__GFP_DIRECT_RECLAIM);
>>
>
> However, gfp has been processed by gfp_nested_mask() in
> stack_depot_save_flags().
Aha, didn't notice. Good to know!
> Still need to call here?
No then we can indeed just mask out __GFP_DIRECT_RECLAIM.
Maybe the comment could say something like:
/*
* Preemption is disabled in ___slab_alloc() so we need to disallow
* blocking. The flags are further adjusted by gfp_nested_mask() in
* stack_depot itself.
*/
> set_track_prepare()
> ->stack_depot_save_flags()
>
>>> >--
>>>>Cheers,
>>>>Harry / Hyeonggon
Powered by blists - more mailing lists