linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Do we still need SLAB_MEM_SPREAD (and possibly others)?
@ 2024-01-31 22:20 Steven Rostedt
  2024-01-31 22:25 ` Yosry Ahmed
  0 siblings, 1 reply; 10+ messages in thread
From: Steven Rostedt @ 2024-01-31 22:20 UTC (permalink / raw)
  To: LKML, linux-mm
  Cc: Andrew Morton, Linus Torvalds, Vlastimil Babka, Kees Cook,
	Christoph Lameter, David Rientjes, Hyeonggon Yoo

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.

-- Steve


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-02-06  3:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-31 22:20 Do we still need SLAB_MEM_SPREAD (and possibly others)? Steven Rostedt
2024-01-31 22:25 ` Yosry Ahmed
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox