From: yangshiguang <yangshiguang1011@163.com>
To: "Vlastimil Babka" <vbabka@suse.cz>
Cc: "Harry Yoo" <harry.yoo@oracle.com>,
"Matthew Wilcox" <willy@infradead.org>,
akpm@linux-foundation.org, cl@gentwo.org, rientjes@google.com,
roman.gushchin@linux.dev, glittao@gmail.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
yangshiguang <yangshiguang@xiaomi.com>,
stable@vger.kernel.org
Subject: Re:Re: [PATCH v3] mm: slub: avoid wake up kswapd in set_track_prepare
Date: Sat, 30 Aug 2025 09:48:26 +0800 (CST) [thread overview]
Message-ID: <15cc44af.7a6.198f8a95fb5.Coremail.yangshiguang1011@163.com> (raw)
In-Reply-To: <9dbd300c-240b-477f-ba03-8a17c7c2b84b@suse.cz>
At 2025-08-29 21:08:58, "Vlastimil Babka" <vbabka@suse.cz> wrote:
>On 8/29/25 13:29, yangshiguang wrote:
>> At 2025-08-27 16:40:21, "Vlastimil Babka" <vbabka@suse.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:
>
sure. Express clearly.
>/*
> * 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
next prev parent reply other threads:[~2025-08-30 1:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-25 12:17 yangshiguang1011
2025-08-25 12:40 ` Matthew Wilcox
2025-08-25 15:42 ` Vlastimil Babka
2025-08-27 5:17 ` Harry Yoo
2025-08-27 7:45 ` yangshiguang
2025-08-27 8:40 ` Vlastimil Babka
[not found] ` <4d271e7e.6bea.198f596bd15.Coremail.yangshiguang1011@163.com>
2025-08-29 13:08 ` Vlastimil Babka
2025-08-30 1:48 ` yangshiguang [this message]
2025-08-27 8:00 ` Vlastimil Babka
2025-08-27 8:44 ` Vlastimil Babka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15cc44af.7a6.198f8a95fb5.Coremail.yangshiguang1011@163.com \
--to=yangshiguang1011@163.com \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=glittao@gmail.com \
--cc=harry.yoo@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=stable@vger.kernel.org \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=yangshiguang@xiaomi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®