linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yosry Ahmed <yosryahmed@google.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org,  Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	 Vlastimil Babka <vbabka@suse.cz>,
	Kees Cook <keescook@chromium.org>,
	Christoph Lameter <cl@linux.com>,
	 David Rientjes <rientjes@google.com>,
	Hyeonggon Yoo <42.hyeyoo@gmail.com>
Subject: Re: Do we still need SLAB_MEM_SPREAD (and possibly others)?
Date: Wed, 31 Jan 2024 14:25:49 -0800	[thread overview]
Message-ID: <CAJD7tkYCrFAXLey-WK8k1Nkt4SoUQ00GWNjU43HJgaLqycBm7Q@mail.gmail.com> (raw)
In-Reply-To: <20240131172027.10f64405@gandalf.local.home>

On Wed, Jan 31, 2024 at 2:20 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> I was looking into moving eventfs_inode into a slab, and after cutting and
> pasting the tracefs allocator:
>
>         tracefs_inode_cachep = kmem_cache_create("tracefs_inode_cache",
>                                                  sizeof(struct tracefs_inode),
>                                                  0, (SLAB_RECLAIM_ACCOUNT|
>                                                      SLAB_MEM_SPREAD|
>                                                      SLAB_ACCOUNT),
>                                                  init_once);
>
> I figured I should know what those slab flags mean. I also looked at what
> others in fs use for their slabs. The above is rather common (which I
> probably just copied from another file system), but I wanted to know what
> they are for.
>
> When I got to SLAB_MEM_SPREAD, I found that it's a common flag and there's
> a lot of caches that just set that and nothing else.
>
> But I couldn't find how it was used.
>
> Then I found this commit:
>
>  16a1d968358a ("mm/slab: remove mm/slab.c and slab_def.h")
>
> Which I think removed the only use case of SLAB_MEM_SPREAD.
>
>  $ git grep SLAB_MEM_SPREAD mm
> mm/slab.h:                            SLAB_MEM_SPREAD | \
>
> That's all I find in the mm directory.
>
> Is it obsolete now? Can we delete it? Maybe there's other SLAB_* flags that
> are no longer used. I don't know, I haven't audited them.

Perhaps cpuset_do_slab_mem_spread() as well.


  reply	other threads:[~2024-01-31 22:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 22:20 Steven Rostedt
2024-01-31 22:25 ` Yosry Ahmed [this message]
2024-01-31 22:40   ` Vlastimil Babka
2024-02-01  6:27     ` Chengming Zhou
2024-02-04  2:06       ` Song, Xiongwei
2024-02-05 17:50         ` Christoph Lameter (Ampere)
     [not found]           ` <PH0PR11MB5192FC6A7AA3CB84BA3BC7E6EC462@PH0PR11MB5192.namprd11.prod.outlook.com>
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

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=CAJD7tkYCrFAXLey-WK8k1Nkt4SoUQ00GWNjU43HJgaLqycBm7Q@mail.gmail.com \
    --to=yosryahmed@google.com \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vbabka@suse.cz \
    /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