lkml.org 
[lkml]   [2017]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] slub: Fix sysfs duplicate filename creation when slub_debug=O
From
Date
On Fri, 2017-11-10 at 10:02 -0600, Christopher Lameter wrote:
> On Fri, 10 Nov 2017, Miles Chen wrote:
>
> > By checking disable_higher_order_debug & (slub_debug &
> > SLAB_NEVER_MERGE), we can detect if a cache is unmergeable but become
> > mergeable because the disable_higher_order_debug=1 logic. Those kind of
> > caches should be keep unmergeable.
>
> Acked-by: Christoph Lameter <cl@linux.com>
>

Thanks for the ack, I already sent a v2 patch to fix a build warning in
this patch.(fix a build error: use instead DEBUG_METADATA_FLAGS of
SLAB_NEVER_MERGE)

diff --git a/mm/slub.c b/mm/slub.c
index 1efbb812..8e1c027 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -5704,6 +5704,10 @@ static int sysfs_slab_add(struct kmem_cache *s)
return 0;
}

+ if (!unmergeable && disable_higher_order_debug &&
+ (slub_debug & DEBUG_METADATA_FLAGS))
+ unmergeable = 1;
+
if (unmergeable) {
/*
* Slabcache can never be merged so we can use the name
proper.

\
 
 \ /
  Last update: 2017-11-12 02:41    [W:0.314 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site