linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Konstantin Khlebnikov <koct9i@gmail.com>
To: Christoph Lameter <cl@linux.com>
Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] mm/slub: disable merging after enabling debug in runtime
Date: Tue, 14 Jul 2015 23:21:52 +0300	[thread overview]
Message-ID: <CALYGNiPKgfE+KNNgmW0ZGrFqU4NSsz_vm14Zu2gXFyjPWnE57g@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1507141304430.28065@east.gentwo.org>

On Tue, Jul 14, 2015 at 9:11 PM, Christoph Lameter <cl@linux.com> wrote:
> On Tue, 14 Jul 2015, Konstantin Khlebnikov wrote:
>
>> Enabling debug in runtime breaks creation of new kmem caches:
>> they have incompatible flags thus cannot be merged but unique
>> names are taken by existing caches.
>
> What breaks?

The same commands from first patch:

# echo 1 | tee /sys/kernel/slab/*/sanity_checks
# modprobe configfs

loading configfs now fails (without crashing kernel though) because of
"sysfs: cannot create duplicate filename '/kernel/slab/:t-0000096'"

Of course we could rename sysfs entry when enable debug options
but that requires much more code than my "stop merging" solution.

>
> Caches may already have been merged and thus the question is what to do
> about a cache that has multiple aliases if a runtime option is requested.
> The solution that slub implements is to only allow a limited number of
> debug operations to be enabled. Those then will appear to affect all
> aliases of course.
>
> Creating additional caches later may create additional
> aliasing which will then restrict what options can be changed.
>
> Other operations are also restricted depending on the number of objects
> stored in a cache. A cache with zero objects can be easily reconfigured.
> If there are objects then modifications that impact object size are not
> allowed anymore.
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-07-14 20:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14 13:17 [PATCH 1/2] mm/slub: fix slab double-free in case of duplicate sysfs filename Konstantin Khlebnikov
2015-07-14 13:17 ` [PATCH 2/2] mm/slub: disable merging after enabling debug in runtime Konstantin Khlebnikov
2015-07-14 18:11   ` Christoph Lameter
2015-07-14 20:21     ` Konstantin Khlebnikov [this message]
2015-07-14 21:18       ` Christoph Lameter
2015-07-17  9:37         ` Konstantin Khlebnikov
2015-07-17 15:09           ` Christoph Lameter
2015-07-17 15:25             ` Konstantin Khlebnikov
2015-07-14 18:11 ` [PATCH 1/2] mm/slub: fix slab double-free in case of duplicate sysfs filename Christoph Lameter
2015-07-16  0:27 ` David Rientjes

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=CALYGNiPKgfE+KNNgmW0ZGrFqU4NSsz_vm14Zu2gXFyjPWnE57g@mail.gmail.com \
    --to=koct9i@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=khlebnikov@yandex-team.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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