mm/slab_common: use SLAB_NO_MERGE instead of negative refcount
authorVlastimil Babka <vbabka@suse.cz>
Tue, 13 Jun 2023 10:28:21 +0000 (12:28 +0200)
committerVlastimil Babka <vbabka@suse.cz>
Fri, 16 Jun 2023 09:04:29 +0000 (11:04 +0200)
commitd5bf485746991ce994994e5935b1cf223678f112
treebf70c9dd6a44e68c0a8c2b36fbcab2f0f3a7ea31
parentd0bf7d5759c1d89fb013aa41cca5832e00b9632a
mm/slab_common: use SLAB_NO_MERGE instead of negative refcount

When CONFIG_MEMCG_KMEM is enabled, we disable cache merging for
KMALLOC_NORMAL caches so they don't end up merged with a cache that uses
ad-hoc __GFP_ACCOUNT when allocating. This was implemented by setting
the refcount to -1, but now we have a proper SLAB_NO_MERGE flag, so use
that instead.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: David Rientjes <rientjes@google.com>
mm/slab_common.c