Skip to content

slub_debug fixes and improvements

Vlastimil Babka linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 18 repliesIn review 8 of 9 applied

Patches in v1 8 of 9 applied

#Subject and filesSizeRepliesApplied
1/9mm, slub: extend slub_debug syntax for multiple blocksDocumentation/admin-guide/kernel-parameters.txt Documentation/vm/slub.rst mm/slub.c+145 -520 repliesApplied
2/9mm, slub: make some slub_debug related attributes read-onlyDocumentation/vm/slub.rst mm/slub.c+20 -540 repliesApplied
3/9mm, slub: remove runtime allocation order changesmm/slub.c+1 -180 repliesApplied
4/9mm, slub: make remaining slub_debug related attributes read-onlyDocumentation/vm/slub.rst mm/slub.c+5 -640 repliesApplied
5/9mm, slub: make reclaim_account attribute read-onlymm/slub.c+1 -100 repliesApplied
6/9mm, slub: introduce static key for slub_debug()mm/slub.c+13 -32 repliesApplied
7/9mm, slub: introduce kmem_cache_debug_flags()mm/slub.c+14 -46 replies
8/9mm, slub: extend checks guarded by slub_debug static keymm/slub.c+3 -31 replyApplied
9/9mm, slab/slub: move and improve cache_from_obj()mm/slab.c mm/slab.h mm/slub.c+29 -239 repliesApplied

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchKees CookRoman Gushchin
1/9R-b
2/9R-b A-b
3/9R-b A-b
4/9R-b A-b
5/9R-b A-b
6/9R-b A-b
7/9A-b A-b A-b
8/9A-b
9/9A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/9] slub_debug fixes and improvements

Hi,

this series puts together the recent series "replace runtime slub_debug toggling with more capable boot parameter" [4] (no longer RFC, thanks for reviews), with older RFC [5] to introduce a static key for slub_debug. It's because the removal of runtime toggling makes the static key addition simpler. The last patch improves cache_from_obj() based on recent debugging effort [6].

We had recently reports [1,2] of troubles with runtime writes to various SLUB per-cache sysfs files related to slub_debug or tuning leading to crashes. I have inspected all those writable files and the rather unfortunate result is that most of them are made read-only by this patchset, as fixing the issues doesn't seem viable. Details for each are given in each patch (2-5)

The runtime toggles were however necessary for the use case described in [3], so the first patch extends the slub_debug boot parameter syntax to achieve the same configuration without runtime toggles. That should hopefully make the changes more feasible.

Patches 6-9 reduce slub_debug overhead in cases where it's compiled in but not enabled during boot, with a static key. Patch 9 also improves bug reporting in cache_from_obj().

[1] https://lkml.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/CAG48ez31PP--h6_FzVyfJ4H86QYczAFPdxtJHUEEan+7VJETAQ@mail.gmail.com
[3] https://lore.kernel.org/r/[email protected]
[4] https://lore.kernel.org/r/[email protected]
[5] https://lore.kernel.org/r/[email protected]
[6] https://lore.kernel.org/r/[email protected]

Vlastimil Babka (9):
mm, slub: extend slub_debug syntax for multiple blocks mm, slub: make some slub_debug related attributes read-only mm, slub: remove runtime allocation order changes
mm, slub: make remaining slub_debug related attributes read-only mm, slub: make reclaim_account attribute read-only mm, slub: introduce static key for slub_debug()
mm, slub: introduce kmem_cache_debug_flags()
mm, slub: extend checks guarded by slub_debug static key mm, slab/slub: move and improve cache_from_obj()

 .../admin-guide/kernel-parameters.txt         |   2 +-
 Documentation/vm/slub.rst                     |  37 +-
 mm/slab.c                                     |   8 +
 mm/slab.h                                     |  23 --
 mm/slub.c                                     | 374 +++++++++---------
 5 files changed, 222 insertions(+), 222 deletions(-)
Signature · 1 line
2.26.2