cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: Chengming Zhou <chengming.zhou@linux.dev>,
	"Song, Xiongwei" <Xiongwei.Song@windriver.com>,
	"Christoph Lameter (Ampere)" <cl@linux.com>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	Yosry Ahmed <yosryahmed@google.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Zefan Li <lizefan.x@bytedance.com>,
	Kees Cook <keescook@chromium.org>,
	David Rientjes <rientjes@google.com>,
	Hyeonggon Yoo <42.hyeyoo@gmail.com>,
	Chengming Zhou <zhouchengming@bytedance.com>,
	Zheng Yejian <zhengyejian1@huawei.com>,
	"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>
Subject: Re: Do we still need SLAB_MEM_SPREAD (and possibly others)?
Date: Mon, 5 Feb 2024 22:34:06 -0500	[thread overview]
Message-ID: <32bc1403-49da-445a-8c00-9686a3b0d6a3@redhat.com> (raw)
In-Reply-To: <f5e918d6-e0a0-4233-b2c1-58505f5e8655@linux.dev>


On 2/5/24 22:25, Chengming Zhou wrote:
> On 2024/2/6 11:20, Waiman Long wrote:
>> On 2/5/24 22:16, Waiman Long wrote:
>>> On 2/5/24 20:46, Song, Xiongwei wrote:
>>>> Adding the maintainers of cpuset of cgroup.
>>>>
>>>>> On Sun, 4 Feb 2024, Song, Xiongwei wrote:
>>>>>
>>>>>> Once SLAB_MEM_SPREAD is removed, IMO, cpuset.memory_spread_slab is useless.
>>>>> SLAB_MEM_SPREAD does not do anything anymore. SLUB relies on the
>>>>> "spreading" via the page allocator memory policies instead of doing its
>>>>> own like SLAB used to do.
>>>>>
>>>>> What does FILE_SPREAD_SLAB do? Dont see anything there either.
>>>> The FILE_SPREAD_SLAB flag is used by cpuset.memory_spread_slab with read/write operations:
>>>>
>>>> In kernel/cgroup/cpuset.c,
>>>> static struct cftype legacy_files[] = {
>>>> ... snip ...
>>>>           {
>>>>                   .name = "memory_spread_slab",
>>>>                   .read_u64 = cpuset_read_u64,
>>>>                   .write_u64 = cpuset_write_u64,
>>>>                   .private = FILE_SPREAD_SLAB,
>>>>           },
>>>> ... snip ...
>>>> };
>>> It looks like that memory_spread_slab may have effect only on the slab allocator. With the removal of the slab allocator, memory_spread_slab is now a no-op. However, the memory_spread_slab cgroupfs file is an externally visible API. So we can't just remove it as it may break existing applications. We can certainly deprecate it and advise users not to use it.
>> BTW, cpuset doesn't use SLAB_MEM_SPREAD directly. Instead it set the task's PFA_SPREAD_SLAB and let other subsystems test it to act appropriately. Other than cpuset, the latest upstream kernel doesn't check or use this flag at all.
>>
> Ok, get it. So cpuset_do_slab_mem_spread() can be removed, but
> this cpuset file interface and PFA_SPREAD_SLAB will be keeped.

Yes, for now.

Cheers,
Longman


      reply	other threads:[~2024-02-06  3:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240131172027.10f64405@gandalf.local.home>
     [not found] ` <CAJD7tkYCrFAXLey-WK8k1Nkt4SoUQ00GWNjU43HJgaLqycBm7Q@mail.gmail.com>
     [not found]   ` <61af19ca-5f9a-40da-a04d-b04ed27b8754@suse.cz>
     [not found]     ` <698633db-b066-4f75-b201-7b785819277b@linux.dev>
     [not found]       ` <PH0PR11MB519280092AA66FAE6BB3FACEEC402@PH0PR11MB5192.namprd11.prod.outlook.com>
     [not found]         ` <fb8161d9-16c0-da8c-09ee-905e39ae199b@linux.com>
2024-02-06  1:46           ` Do we still need SLAB_MEM_SPREAD (and possibly others)? Song, Xiongwei
2024-02-06  3:16             ` Waiman Long
2024-02-06  3:20               ` Waiman Long
2024-02-06  3:25                 ` Chengming Zhou
2024-02-06  3:34                   ` Waiman Long [this message]

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=32bc1403-49da-445a-8c00-9686a3b0d6a3@redhat.com \
    --to=longman@redhat.com \
    --cc=42.hyeyoo@gmail.com \
    --cc=Xiongwei.Song@windriver.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=chengming.zhou@linux.dev \
    --cc=cl@linux.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizefan.x@bytedance.com \
    --cc=rientjes@google.com \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vbabka@suse.cz \
    --cc=yosryahmed@google.com \
    --cc=zhengyejian1@huawei.com \
    --cc=zhouchengming@bytedance.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).