linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/10] how to reclaim unneeded vmlinux memory ?
@ 2023-10-12 19:48 Jim Cromie
  2023-10-12 19:48 ` [RFC PATCH 01/10] dyndbg: prep to isolate 3 repetetive fields Jim Cromie
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Jim Cromie @ 2023-10-12 19:48 UTC (permalink / raw)
  To: linux-kernel, jbaron, gregkh
  Cc: david, lb, linux, joe, mcgrof, Liam.Howlett, linux-mm, Jim Cromie

For builtin modules, dynamic-debug allocates blocks of memory into
DATA, via vmlinux.lds.h.

dyndbg's struct _ddebug has fields: modname, filename, function, which
keeps the the code's structural/organizational info used to enable &
prefix prdbg callsites.

The linker packs the callsites in-order, which means the repetition in
those 3 columns can be compactly encoded in non-overlapping intervals.

So this saves each unique column-val and its interval into a
maple-tree per column, and retrieves them as needed with accessors.

It also splits out _ddebug_site and __dyndbg_sites section, and no
longer needs the section, so that block is ready to reclaim.

Somethings wrong with patch-9, but it seems worth showing around.


Jim Cromie (10):
  dyndbg: prep to isolate 3 repetetive fields
  dyndbg: split __dyndbg_sites section out from __dyndbg
  dyndbg: add 2nd cursor pair to init-fn
  dyndbg: save _ddebug_site mod,file,func fields into maple-trees
  dyndbg: avoid _ddebug.site in ddebug_condense_sites
  dyndbg: add site_*() macros to avoid using _ddebug.site
  dyndbg: wire in __desc_*() functions
  dyndbg: drop _ddebug.site member
  dyndbg: add dd_clear_range to prune mtrees
  dyndbg: cache the dynamically generated prefixes per callsite

 include/asm-generic/vmlinux.lds.h |   1 +
 include/linux/dynamic_debug.h     |  40 +++--
 kernel/module/main.c              |   3 +
 lib/dynamic_debug.c               | 238 +++++++++++++++++++++++++++---
 4 files changed, 252 insertions(+), 30 deletions(-)

-- 
2.41.0



^ permalink raw reply	[flat|nested] 12+ messages in thread
* [RFC PATCH 00/10] how to reclaim unneeded vmlinux memory ?
@ 2023-10-12 19:47 Jim Cromie
  2023-10-12 19:47 ` [RFC PATCH 02/10] dyndbg: split __dyndbg_sites section out from __dyndbg Jim Cromie
  0 siblings, 1 reply; 12+ messages in thread
From: Jim Cromie @ 2023-10-12 19:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: david, Liam.Howlett, linux-mm, Jim Cromie

For builtin modules, dynamic-debug allocates blocks of memory into
DATA, via vmlinux.lds.h.

dyndbg's struct _ddebug has fields: modname, filename, function, which
keeps the the code's structural/organizational info used to enable &
prefix prdbg callsites.

The linker packs the callsites in-order, which means the repetition in
those 3 columns can be compactly encoded in non-overlapping intervals.

So this saves each unique column-val and its interval into a
maple-tree per column, and retrieves them as needed with accessors.

It also splits out _ddebug_site and __dyndbg_sites section, and no
longer needs the section, so that block is ready to reclaim.

Somethings wrong with patch-9, but it seems worth showing around.


Jim Cromie (10):
  dyndbg: prep to isolate 3 repetetive fields
  dyndbg: split __dyndbg_sites section out from __dyndbg
  dyndbg: add 2nd cursor pair to init-fn
  dyndbg: save _ddebug_site mod,file,func fields into maple-trees
  dyndbg: avoid _ddebug.site in ddebug_condense_sites
  dyndbg: add site_*() macros to avoid using _ddebug.site
  dyndbg: wire in __desc_*() functions
  dyndbg: drop _ddebug.site member
  dyndbg: add dd_clear_range to prune mtrees
  dyndbg: cache the dynamically generated prefixes per callsite

 include/asm-generic/vmlinux.lds.h |   1 +
 include/linux/dynamic_debug.h     |  40 +++--
 kernel/module/main.c              |   3 +
 lib/dynamic_debug.c               | 238 +++++++++++++++++++++++++++---
 4 files changed, 252 insertions(+), 30 deletions(-)

-- 
2.41.0



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-10-12 19:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-12 19:48 [RFC PATCH 00/10] how to reclaim unneeded vmlinux memory ? Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 01/10] dyndbg: prep to isolate 3 repetetive fields Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 02/10] dyndbg: split __dyndbg_sites section out from __dyndbg Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 03/10] dyndbg: add 2nd cursor pair to init-fn Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 04/10] dyndbg: save _ddebug_site mod,file,func fields into maple-trees Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 05/10] dyndbg: avoid _ddebug.site in ddebug_condense_sites Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 06/10] dyndbg: add site_*() macros to avoid using _ddebug.site Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 07/10] dyndbg: wire in __desc_*() functions Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 08/10] dyndbg: drop _ddebug.site member Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 09/10] dyndbg: add dd_clear_range to prune mtrees Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 10/10] dyndbg: cache the dynamically generated prefixes per callsite Jim Cromie
  -- strict thread matches above, loose matches on Subject: below --
2023-10-12 19:47 [RFC PATCH 00/10] how to reclaim unneeded vmlinux memory ? Jim Cromie
2023-10-12 19:47 ` [RFC PATCH 02/10] dyndbg: split __dyndbg_sites section out from __dyndbg Jim Cromie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox