kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] dyndbg: WIP diet plan
@ 2020-08-05 18:30 Jim Cromie
  2020-08-05 18:30 ` [PATCH 1/8] dyndbg: give %3u width in pr-format, cosmetic only Jim Cromie
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Jim Cromie @ 2020-08-05 18:30 UTC (permalink / raw)
  To: jbaron; +Cc: Jim Cromie, kernelnewbies

dynamic-debug metadata is bloated; the __dyndbg linker section is
effectively an array of struct _ddebugs, its 1st 3 members are highly
repetetive, with 90%, 84%, 45% repeats.  Total reported usage ~150kb
for ~2600 callsites on my laptop config.

This patchset is one diet plan. it all holds together nicely until the
"cache" commit, when it blows up starting init (or right after freeing
unused kernel image, which Im hoping to do...).  The following commit
tweaks locking in an attempt to recover, but fails.


[    0.737936] Freeing unused kernel image (initmem) memory: 1196K
[    0.740173] Write protecting the kernel read-only data: 22528k
[    0.743555] Freeing unused kernel image (text/rodata gap) memory: 2040K
[    0.744984] Freeing unused kernel image (rodata/data gap) memory: 256K
[    0.757777] Run /bin/sh as init process
q[    1.029548] Kernel panic - not syncing: Requested init /bin/sh failed (error -14).
[    1.034582] CPU: 0 PID: 1 Comm: sh Not tainted 5.8.0-00026-g9a06159192d6 #14
[    1.036068] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-2.fc32 04/01/2014
[    1.037885] Call Trace:
[    1.038444]  dump_stack+0x5e/0x7a
[    1.039172]  ? memcpy_orig+0x100/0x10f
[    1.039917]  panic+0xf6/0x2b7
[    1.040573]  ? rest_init+0xa0/0xa0
[    1.041314]  kernel_init+0xaa/0x100
[    1.041956]  ret_from_fork+0x22/0x30
[    1.042668] Kernel Offset: disabled
[    1.043216] ---[ end Kernel panic - not syncing: Requested init /bin/sh failed (error -14). ]---
QEMU 4.2.1 monitor - type 'help' for more information
(qemu) q

Im sending to kernelnewbies 1st, to see if theres any low-speed
test-crashes I can get post-mortems of, before I take it to the races.

Id appreciate any reviews, tests, or opinions you all might offer (in
that order).  I built for and tested on a virtme instance, 4/5 configs
build and test sane as described, the 5th is probly dead from too many
hacks.

if you use git, and wanna just try it, you can find it here:
  git remote add .. # u dont need full clone
  https://github.com/jimc/linux.git  dyndbg-diet branch

I had good success with virtme, -q=-s -q=-S, and gdb target remote,
all newbies should try it.

These are on top of 5.8.0 +18 others, which GregKH added to his
char-misc-testing &next trees.


Jim Cromie (8):
  dyndbg: give %3u width in pr-format, cosmetic only
  dyndbg: motivate a diet plan
  dyndbg: select ZPOOL in Kconfig.debug
  dyndbg: split struct _ddebug in 2, creating _ddebug_callsite
  dyndbg: WIP replace __dyndbg_callsite section with a zs-pool copy.
  dyndbg: ddebug_zpool_remove
  dyndbg: enable 'cache' of active pr_debug callsites
  dyndbg: add locking around zpool-add loop in zpool-init

 include/asm-generic/vmlinux.lds.h |   4 +
 include/linux/dynamic_debug.h     |  39 ++++--
 lib/Kconfig.debug                 |   1 +
 lib/dynamic_debug.c               | 223 +++++++++++++++++++++++++-----
 4 files changed, 223 insertions(+), 44 deletions(-)

-- 
2.26.2


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

end of thread, other threads:[~2020-08-06 17:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-05 18:30 [PATCH 0/8] dyndbg: WIP diet plan Jim Cromie
2020-08-05 18:30 ` [PATCH 1/8] dyndbg: give %3u width in pr-format, cosmetic only Jim Cromie
2020-08-05 18:30 ` [PATCH 2/8] dyndbg: motivate a diet plan Jim Cromie
2020-08-05 18:30 ` [PATCH 3/8] dyndbg: select ZPOOL in Kconfig.debug Jim Cromie
2020-08-05 18:30 ` [PATCH 4/8] dyndbg: split struct _ddebug in 2, creating _ddebug_callsite Jim Cromie
2020-08-05 18:30 ` [PATCH 5/8] dyndbg: WIP replace __dyndbg_callsite section with a zs-pool copy Jim Cromie
2020-08-05 18:30 ` [PATCH 6/8] dyndbg: ddebug_zpool_remove Jim Cromie
2020-08-05 18:30 ` [PATCH 7/8] dyndbg: enable 'cache' of active pr_debug callsites Jim Cromie
2020-08-05 18:30 ` [PATCH 8/8] dyndbg: add locking around zpool-add loop in zpool-init Jim Cromie
2020-08-05 22:15 ` [PATCH 0/8] dyndbg: WIP diet plan jim.cromie
2020-08-06 10:39 ` Greg KH
2020-08-06 17:56   ` jim.cromie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).