Re: [RFC PATCH] printk: Change timestamp to triplet as mono, boot and real

2020-08-13 Thread Dave Young
On 08/11/20 at 12:40pm, Orson Zhai wrote: > From: Thomas Gleixner > > Timestamps printed in kernel log are retrieved by local_clock which reads > jiffies as a referrence clock source. > But it is diffcult to be synchronized with logs generated out of kernel, > say some remote processors (Modem) i

[PATCH 1/2] kexec: Add quick kexec support for kernel

2020-08-13 Thread Sang Yan
In normal kexec, relocating kernel may cost 5 ~ 10 seconds, to copy all segments from vmalloced memory to kernel boot memory, because of disabled mmu. We introduce quick kexec to save time of copying memory as above, just like kdump(kexec on crash), by using reserved memory "Quick Kexec". Constru

[PATCH 2/2] arm64: Reserve memory for quick kexec

2020-08-13 Thread Sang Yan
Reserve memory for quick kexec on arm64 with cmdline "quickkexec=". Signed-off-by: Sang Yan --- arch/arm64/kernel/setup.c | 6 ++ arch/arm64/mm/init.c | 43 +++ 2 files changed, 49 insertions(+) diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/ke

Re: [PATCH] kexec: Delete an unnecessary comparison

2020-08-13 Thread Joe Perches
On Thu, 2020-08-13 at 20:45 +0800, Youling Tang wrote: > Regardless of whether the ret value is zero or non-zero, the trajectory > of the program execution is the same, so there is no need to compare. > > Signed-off-by: Youling Tang > --- > kernel/kexec_file.c | 2 -- > 1 file changed, 2 deletio

Re: [PATCH] kexec: Delete an unnecessary comparison

2020-08-13 Thread Dave Young
On 08/13/20 at 08:45pm, Youling Tang wrote: > Regardless of whether the ret value is zero or non-zero, the trajectory > of the program execution is the same, so there is no need to compare. > > Signed-off-by: Youling Tang > --- > kernel/kexec_file.c | 2 -- > 1 file changed, 2 deletions(-) > >

Re: POC: Alternative solution: Re: [PATCH 0/4] printk: reimplement LOG_CONT handling

2020-08-13 Thread Sergey Senozhatsky
On (20/08/13 12:35), John Ogness wrote: > I believe I failed to recognize the fundamental problem. The fundamental > problem is that the pr_cont() semantics are very poor. The semantics is pretty clear - use it only in UP early bootup, anything else is broken :) /* * Annotation for a "contin

[PATCH] kexec: Delete an unnecessary comparison

2020-08-13 Thread Youling Tang
Regardless of whether the ret value is zero or non-zero, the trajectory of the program execution is the same, so there is no need to compare. Signed-off-by: Youling Tang --- kernel/kexec_file.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c index 7

Re: POC: Alternative solution: Re: [PATCH 0/4] printk: reimplement LOG_CONT handling

2020-08-13 Thread Sergey Senozhatsky
On (20/08/13 10:41), Petr Mladek wrote: > > My concerns about this idea: > > > > - What if the printk user does not correctly terminate the cont message? > > There is no mechanism to allow that open record to be force-finalized > > so that readers can read newer records. > > This is a real pr

Re: [RFC PATCH] printk: Change timestamp to triplet as mono, boot and real

2020-08-13 Thread Sergey Senozhatsky
On (20/08/13 12:22), Petr Mladek wrote: > > + would take more space (prefix + text vs. binary representation) Dict buffer is allocated regardless of how we use it, and only printks from drivers/* (dev_printk*) add dict payload. It might be the case that on some (if not most) systems dict pages a

Re: POC: Alternative solution: Re: [PATCH 0/4] printk: reimplement LOG_CONT handling

2020-08-13 Thread Petr Mladek
On Thu 2020-08-13 12:35:47, John Ogness wrote: > On 2020-08-13, Petr Mladek wrote: > > On Thu 2020-08-13 09:50:25, John Ogness wrote: > >> On 2020-08-13, Sergey Senozhatsky wrote: > >> > This is not an unseen pattern, I'm afraid. And the problem here can > >> > be more general: > >> > > >> > pr_

Re: POC: Alternative solution: Re: [PATCH 0/4] printk: reimplement LOG_CONT handling

2020-08-13 Thread John Ogness
On 2020-08-13, Petr Mladek wrote: > On Thu 2020-08-13 09:50:25, John Ogness wrote: >> On 2020-08-13, Sergey Senozhatsky wrote: >> > This is not an unseen pattern, I'm afraid. And the problem here can >> > be more general: >> > >> >pr_info("text"); >> >pr_cont("1"); >> >exception/IRQ/N

Re: [RFC PATCH] printk: Change timestamp to triplet as mono, boot and real

2020-08-13 Thread Thomas Gleixner
Sergey Senozhatsky writes: > On (20/08/11 15:02), Petr Mladek wrote: >> There is still the alternative to print all three timestamps regularly >> for those interested. It is less user convenient but much easier >> to maintain. > > Yes, that's a nice alternative. It's trivial on the kernel side, a

Re: [RFC PATCH] printk: Change timestamp to triplet as mono, boot and real

2020-08-13 Thread Petr Mladek
On Thu 2020-08-13 10:55:00, Sergey Senozhatsky wrote: > On (20/08/11 15:02), Petr Mladek wrote: > > On Tue 2020-08-11 14:05:12, Thomas Gleixner wrote: > > > Petr Mladek writes: > > > > At least "crash" tool would need an update anyway. AFAIK, it checks > > > > the size of struct printk_log and ref

Re: POC: Alternative solution: Re: [PATCH 0/4] printk: reimplement LOG_CONT handling

2020-08-13 Thread Petr Mladek
On Thu 2020-08-13 09:50:25, John Ogness wrote: > On 2020-08-13, Sergey Senozhatsky wrote: > > This is not an unseen pattern, I'm afraid. And the problem here can > > be more general: > > > > pr_info("text"); > > pr_cont("1"); > > exception/IRQ/NMI > > pr_alert("text\n"); >

Re: POC: Alternative solution: Re: [PATCH 0/4] printk: reimplement LOG_CONT handling

2020-08-13 Thread Petr Mladek
On Thu 2020-08-13 14:18:53, Sergey Senozhatsky wrote: > On (20/08/13 02:30), John Ogness wrote: > > 2. I haven't yet figured out how to preserve calling context when a > > newline appears. For example: > > > > pr_info("text"); > > pr_cont(" 1"); > > pr_cont(" 2\n"); > > pr_cont("3"); > > pr_cont("

Re: POC: Alternative solution: Re: [PATCH 0/4] printk: reimplement LOG_CONT handling

2020-08-13 Thread John Ogness
On 2020-08-13, Sergey Senozhatsky wrote: > This is not an unseen pattern, I'm afraid. And the problem here can > be more general: > > pr_info("text"); > pr_cont("1"); > exception/IRQ/NMI > pr_alert("text\n"); > pr_cont("2"); > pr_cont("\n"); > > I guess

Re: POC: Alternative solution: Re: [PATCH 0/4] printk: reimplement LOG_CONT handling

2020-08-13 Thread Petr Mladek
On Thu 2020-08-13 02:30:02, John Ogness wrote: > On 2020-08-12, Petr Mladek wrote: > > So, I have one crazy idea to add one more state bit so that we > > could have: > > > > + committed: set when the data are written into the data ring. > > + final: set when the data block could not longer get