Re: [Crash-utility] [RFC PATCH 0/1] support lockless printk ringbuffer

2020-04-30 Thread 萩尾 一仁
Hi John,

> -Original Message-
> Hi Kazu,
> 
> Here is a patch adding full support for the new lockless printk
> ringbuffer as it is currently being proposed. Note that the latest
> version has not yet been submitted to LKML. I was waiting until I
> finished tests with crash(8) and makedumpfile(8).
> 
> The new ringbuffer will export all the necessary symbols, sizes,
> and offsets in VMCOREINFO.
> 
> Note that I created a separate printk.c for the iteration logic.

That's good.

> 
> Also note that I modified dwarf_info.c to support resolving
> typedefs of typedefs. This was necessary in order to support
> atomic_long_t and its "counter" member.

OK, I see.

> 
> I don't expect you to take the patch as-is, but I hope it can
> provide some positive ground work for moving forward.

OK.  It looks already well-considered.
Thank you very much for the patch!

Kazu

> 
> John Ogness (1):
>   printk: add support for lockless ringbuffer
> 
>  Makefile   |   2 +-
>  dwarf_info.c   |  36 +-
>  makedumpfile.c | 101 ++--
>  makedumpfile.h |  25 +++
>  printk.c   | 177 +
>  5 files changed, 333 insertions(+), 8 deletions(-)
>  create mode 100644 printk.c
> 
> --
> 2.20.1


--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility



[Crash-utility] [RFC PATCH 0/1] support lockless printk ringbuffer

2020-04-29 Thread John Ogness
Hi Kazu,

Here is a patch adding full support for the new lockless printk
ringbuffer as it is currently being proposed. Note that the latest
version has not yet been submitted to LKML. I was waiting until I
finished tests with crash(8) and makedumpfile(8).

The new ringbuffer will export all the necessary symbols, sizes,
and offsets in VMCOREINFO.

Note that I created a separate printk.c for the iteration logic.

Also note that I modified dwarf_info.c to support resolving
typedefs of typedefs. This was necessary in order to support
atomic_long_t and its "counter" member.

I don't expect you to take the patch as-is, but I hope it can
provide some positive ground work for moving forward.

John Ogness (1):
  printk: add support for lockless ringbuffer

 Makefile   |   2 +-
 dwarf_info.c   |  36 +-
 makedumpfile.c | 101 ++--
 makedumpfile.h |  25 +++
 printk.c   | 177 +
 5 files changed, 333 insertions(+), 8 deletions(-)
 create mode 100644 printk.c

-- 
2.20.1


--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility



Re: [Crash-utility] [RFC PATCH 0/1] support lockless printk ringbuffer

2020-04-21 Thread Dave Anderson



- Original Message -
> Hi Dave,
> 
> I created a proof-of-concept patch to work with the new printk
> ringbuffer (as it is currently being proposed). I create a separate
> source file (printk.c) because of all the helper functions.

That's fine.

> 
> The code doesn't do much error checking if symbols were missing,
> and it probably doesn't work unless the machine running crash(8)
> has the same endian and pointer-size as the crashed machine. But
> otherwise, it does work correctly.

Not a problem.  With respect to both endian-ness and pointer-size, the
crash utility binary must match that of the dumpfile's kernel. 

> The most important part I wanted to have implemented was the new
> logic for record traversal and printing. Being one of the authors
> for the new printk ringbuffer, implementing this was far easier
> for me than for someone unfamiliar with the ringbuffer internals.
> 
> It is using the new "prb" symbol. I did not add VMCOREINFO
> support.
> 
> Note that this is based on the PATCHv2 that I have queued for
> posting to LKML, but as of right now have not yet posted.
> Basically I am waiting for feedback from Kazuhito regarding my
> VMCOREINFO query. (It will not work with previous iterations
> of the new ringbuffer because the struct names have changed.)

Right -- I'm interested in what he has to say.

> 
> I don't expect you to take the patch as-is, but I hope it can
> provide some positive ground work for moving forward.

It looks pretty good for starters.  Damn good!

And I have to say how much I appreciate the initiative you've
taken to help us out here.  Usually kernel developers are either 
(1) unaware of how their changes affect the crash utility 
and/or makedumpfile, or (2) don't give a shit. 

Thanks,
  Dave
  

 
> John Ogness (1):
>   crash: printk: add support for lockless ringbuffer
> 
>  Makefile |   5 +
>  defs.h   |  24 +
>  kernel.c |   8 +-
>  printk.c | 298 +++
>  4 files changed, 334 insertions(+), 1 deletion(-)
>  create mode 100644 printk.c
> 
> --
> 2.20.1
> 
> 

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility



[Crash-utility] [RFC PATCH 0/1] support lockless printk ringbuffer

2020-04-21 Thread John Ogness
Hi Dave,

I created a proof-of-concept patch to work with the new printk
ringbuffer (as it is currently being proposed). I create a separate
source file (printk.c) because of all the helper functions.

The code doesn't do much error checking if symbols were missing,
and it probably doesn't work unless the machine running crash(8)
has the same endian and pointer-size as the crashed machine. But
otherwise, it does work correctly.

The most important part I wanted to have implemented was the new
logic for record traversal and printing. Being one of the authors
for the new printk ringbuffer, implementing this was far easier
for me than for someone unfamiliar with the ringbuffer internals.

It is using the new "prb" symbol. I did not add VMCOREINFO
support.

Note that this is based on the PATCHv2 that I have queued for
posting to LKML, but as of right now have not yet posted.
Basically I am waiting for feedback from Kazuhito regarding my
VMCOREINFO query. (It will not work with previous iterations
of the new ringbuffer because the struct names have changed.)

I don't expect you to take the patch as-is, but I hope it can
provide some positive ground work for moving forward.

John Ogness (1):
  crash: printk: add support for lockless ringbuffer

 Makefile |   5 +
 defs.h   |  24 +
 kernel.c |   8 +-
 printk.c | 298 +++
 4 files changed, 334 insertions(+), 1 deletion(-)
 create mode 100644 printk.c

-- 
2.20.1


--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility