From: Shakeel Butt <shakeelb@google.com>
To: "Jason A . Donenfeld" <Jason@zx2c4.com>
Cc: Dmitry Vyukov <dvyukov@google.com>,
aryabinin@virtuozzo.com, Alexander Potapenko <glider@google.com>,
cl@linux.com, penberg@kernel.org, rientjes@google.com,
iamjoonsoo.kim@lge.com, Andrew Morton <akpm@linux-foundation.org>,
kasan-dev@googlegroups.com, Linux-MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
Shakeel Butt <shakeelb@google.com>
Subject: Re: Possible regression in "slab, slub: skip unnecessary kasan_cache_shutdown()"
Date: Tue, 19 Jun 2018 12:21:39 -0700 [thread overview]
Message-ID: <20180619192139.31781-1-shakeelb@google.com> (raw)
In-Reply-To: <CAHmME9q7aKGNiYauCjyy6Fu+bryPphEoLEMbAObTJgTrTfS2uw@mail.gmail.com>
On Tue, Jun 19, 2018 at 8:19 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> On Tue, Jun 19, 2018 at 5:08 PM Shakeel Butt <shakeelb@google.com> wrote:
> > > > Are you using SLAB or SLUB? We stress kernel pretty heavily, but with
> > > > SLAB, and I suspect Shakeel may also be using SLAB. So if you are
> > > > using SLUB, there is significant chance that it's a bug in the SLUB
> > > > part of the change.
> > >
> > > Nice intuition; I am indeed using SLUB rather than SLAB...
> > >
> >
> > Can you try once with SLAB? Just to make sure that it is SLUB specific.
>
> Sorry, I meant to mention that earlier. I tried with SLAB; the crash
> does not occur. This appears to be SLUB-specific.
Jason, can you try the following patch?
---
mm/slub.c | 8 ++++++++
1 file changed, 8 insertions(+)
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;
--
2.18.0.rc1.244.gcf134e6275-goog
next prev parent reply other threads:[~2018-06-19 19:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 2:51 Jason A. Donenfeld
2018-06-19 3:59 ` Shakeel Butt
2018-06-19 4:08 ` Jason A. Donenfeld
2018-06-19 4:55 ` Dmitry Vyukov
2018-06-19 13:04 ` Jason A. Donenfeld
2018-06-19 13:16 ` Dmitry Vyukov
2018-06-19 15:08 ` Shakeel Butt
2018-06-19 15:18 ` Jason A. Donenfeld
2018-06-19 19:21 ` Shakeel Butt [this message]
2018-06-19 20:20 ` Jason A. Donenfeld
2018-06-19 5:06 ` Shakeel Butt
2018-06-19 13:25 ` Jason A. Donenfeld
2018-06-19 13:30 ` Dmitry Vyukov
2018-06-19 13:40 ` Jason A. Donenfeld
2018-06-19 17:34 ` Andrey Ryabinin
2018-06-19 20:17 ` Jason A. Donenfeld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180619192139.31781-1-shakeelb@google.com \
--to=shakeelb@google.com \
--cc=Jason@zx2c4.com \
--cc=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=cl@linux.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox