Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1183983 > unrolled thread

Re: [PATCH 2/2] mm/slub: disable merging after enabling debug in runtime

Started byKonstantin Khlebnikov <koct9i@gmail.com>
First post2015-07-14 22:30 +0200
Last post2015-07-17 11:40 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 2/2] mm/slub: disable merging after enabling debug in runtime Konstantin Khlebnikov <koct9i@gmail.com> - 2015-07-14 22:30 +0200
    Re: [PATCH 2/2] mm/slub: disable merging after enabling debug in runtime Konstantin Khlebnikov <koct9i@gmail.com> - 2015-07-17 11:40 +0200

#1183983 — Re: [PATCH 2/2] mm/slub: disable merging after enabling debug in runtime

FromKonstantin Khlebnikov <koct9i@gmail.com>
Date2015-07-14 22:30 +0200
SubjectRe: [PATCH 2/2] mm/slub: disable merging after enabling debug in runtime
Message-ID<pMeZZ-2zG-31@gated-at.bofh.it>
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1186644

FromKonstantin Khlebnikov <koct9i@gmail.com>
Date2015-07-17 11:40 +0200
Message-ID<pNahz-1uy-15@gated-at.bofh.it>
In reply to#1183983
On Wed, Jul 15, 2015 at 12:18 AM, Christoph Lameter <cl@linux.com> wrote:
>
> On Tue, 14 Jul 2015, Konstantin Khlebnikov wrote:
>> > 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'"
>
> Hrm.... Bad. Maybe drop the checks for the debug options that can be
> configured when merging slabs? They do not influence the object layout
> per definition.

I don't understand that. Debug options do changes in object layout.

Since they add significant performance overhead and cannot be undone in runtime
it's unlikely that anyone who uses them don't care about merging after that.
Also I don't see how merging could affect debugging in positive way
(except debugging bugs in merging logic itself).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web