lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 4 Feb 2024 02:06:10 +0000
From: "Song, Xiongwei" <Xiongwei.Song@...driver.com>
To: Chengming Zhou <chengming.zhou@...ux.dev>,
        Vlastimil Babka
	<vbabka@...e.cz>, Yosry Ahmed <yosryahmed@...gle.com>,
        Steven Rostedt
	<rostedt@...dmis.org>
CC: LKML <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org"
	<linux-mm@...ck.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linus
 Torvalds <torvalds@...ux-foundation.org>,
        Kees Cook <keescook@...omium.org>, Christoph Lameter <cl@...ux.com>,
        David Rientjes <rientjes@...gle.com>,
        Hyeonggon Yoo <42.hyeyoo@...il.com>,
        Chengming Zhou
	<zhouchengming@...edance.com>,
        Zheng Yejian <zhengyejian1@...wei.com>
Subject: RE: Do we still need SLAB_MEM_SPREAD (and possibly others)?



> -----Original Message-----
> From: Chengming Zhou <chengming.zhou@...ux.dev>
> Sent: Thursday, February 1, 2024 2:27 PM
> To: Vlastimil Babka <vbabka@...e.cz>; Yosry Ahmed
> <yosryahmed@...gle.com>; Steven Rostedt <rostedt@...dmis.org>
> Cc: LKML <linux-kernel@...r.kernel.org>; linux-mm@...ck.org; Andrew
> Morton <akpm@...ux-foundation.org>; Linus Torvalds <torvalds@...ux-
> foundation.org>; Kees Cook <keescook@...omium.org>; Christoph Lameter
> <cl@...ux.com>; David Rientjes <rientjes@...gle.com>; Hyeonggon Yoo
> <42.hyeyoo@...il.com>; Song, Xiongwei <Xiongwei.Song@...driver.com>;
> Chengming Zhou <zhouchengming@...edance.com>; Zheng Yejian
> <zhengyejian1@...wei.com>
> Subject: Re: Do we still need SLAB_MEM_SPREAD (and possibly others)?
> 
> 
> On 2024/2/1 06:40, Vlastimil Babka wrote:
> > On 1/31/24 23:25, Yosry Ahmed wrote:
> >> On Wed, Jan 31, 2024 at 2:20 PM Steven Rostedt <rostedt@...dmis.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.
> >
> > Yep, good find. Show how obscure mm/slab.c was in the end :)
> >
> > CCing a few more new people who did slab changes recently, who'd like
> some
> > low hanging fruit of negative diffcount? :)
> 
> Thanks for CCing, I can prepare the patch to do it. IIUC, what I need to do is:
> 
> 1. delete SLAB_MEM_SPREAD and all its uses.
> 
> 2. cpuset_do_slab_mem_spread() is not used anymore, should we keep the
> interface?
>    Since it's the interface exported by cgroup-v1
> "cpuset.memory_spread_slab".

Once SLAB_MEM_SPREAD is removed, IMO, cpuset.memory_spread_slab is useless.

Regards,
Xiongwei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ