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
| ||
|
Date: Mon, 22 Jun 2020 10:36:21 -0700 From: Shakeel Butt <shakeelb@...gle.com> To: Roman Gushchin <guro@...com> Cc: Andrew Morton <akpm@...ux-foundation.org>, Christoph Lameter <cl@...ux.com>, Johannes Weiner <hannes@...xchg.org>, Michal Hocko <mhocko@...nel.org>, Linux MM <linux-mm@...ck.org>, Vlastimil Babka <vbabka@...e.cz>, Kernel Team <kernel-team@...com>, LKML <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v6 15/19] mm: memcg/slab: deprecate slab_root_caches On Mon, Jun 8, 2020 at 4:07 PM Roman Gushchin <guro@...com> wrote: > > Currently there are two lists of kmem_caches: > 1) slab_caches, which contains all kmem_caches, > 2) slab_root_caches, which contains only root kmem_caches. > > And there is some preprocessor magic to have a single list > if CONFIG_MEMCG_KMEM isn't enabled. > > It was required earlier because the number of non-root kmem_caches > was proportional to the number of memory cgroups and could reach > really big values. Now, when it cannot exceed the number of root > kmem_caches, there is really no reason to maintain two lists. > > We never iterate over the slab_root_caches list on any hot paths, > so it's perfectly fine to iterate over slab_caches and filter out > non-root kmem_caches. > > It allows to remove a lot of config-dependent code and two pointers > from the kmem_cache structure. > > Signed-off-by: Roman Gushchin <guro@...com> > Reviewed-by: Vlastimil Babka <vbabka@...e.cz> Reviewed-by: Shakeel Butt <shakeelb@...gle.com>
Powered by blists - more mailing lists