public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, shakeelb@google.com,
	dave.hansen@intel.com, rientjes@google.com, mhocko@suse.com
Subject: Re: slub: don't panic for memcg kmem cache creation failure
Date: Sat, 29 Jun 2019 17:05:33 +0300	[thread overview]
Message-ID: <20190629140533.GA10164@avx2> (raw)

> -       if (flags & SLAB_PANIC)
> -               panic("Cannot create slab %s size=%u realsize=%u order=%u offset=%u flags=%lx\n",
> -                     s->name, s->size, s->size,
> -                     oo_order(s->oo), s->offset, (unsigned long)flags);

This is wrong. Without SLAB_PANIC people will start to implement error
checking out of habit and add all slightly different error messages.
This simply increases text and rodata size.

If memcg kmem caches creation failure is OK, then SLAB_PANIC should not
be passed.

The fact that SLAB doesn't implement SLAB_PANIC is SLAB bug.

             reply	other threads:[~2019-06-29 14:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-29 14:05 Alexey Dobriyan [this message]
2019-06-29 20:31 ` slub: don't panic for memcg kmem cache creation failure Shakeel Butt

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=20190629140533.GA10164@avx2 \
    --to=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=rientjes@google.com \
    --cc=shakeelb@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