Message ID | 20180619192139.31781-1-shakeelb@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Shakeel,
On Tue, Jun 19, 2018 at 9:21 PM Shakeel Butt <shakeelb@google.com> wrote:
> Jason, can you try the following patch?
Your patch also fixed the problem, which was also fixed by enabling
CONFIG_SLUB_DEBUG, per the other email. I haven't checked to see if
your patch is simply a subset of what SLUB_DEBUG is doing or what. But
hopefully this points in the right direction now.
Jason
diff --git a/mm/slub.c b/mm/slub.c index a3b8467c14af..746cfe4515c2 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3673,9 +3673,17 @@ static void free_partial(struct kmem_cache *s, struct kmem_cache_node *n) bool __kmem_cache_empty(struct kmem_cache *s) { + int cpu; int node; struct kmem_cache_node *n; + for_each_online_cpu(cpu) { + struct kmem_cache_cpu *c = per_cpu_ptr(s->cpu_slab, cpu); + + if (c->page || slub_percpu_partial(c)) + return false; + } + for_each_kmem_cache_node(s, node, n) if (n->nr_partial || slabs_node(s, node)) return false;