Re: [PATCH v1 1/1] printk: always output coreid in caller information
From: Ruifeng Zhang
Date: Wed May 19 2021 - 05:25:44 EST
Dear John,
Thanks for your review and reply.
I am glad to know the Linux Community had been discussing this requirements.
My patch really has some problems you proposed.
I will pay attention to the modification about extra message output in printk.
Thanks.
Best regards,
Ruifeng
John Ogness <john.ogness@xxxxxxxxxxxxx> 于2021年5月19日周三 下午4:25写道:
>
> Hello Ruifeng,
>
> On 2021-05-19, Ruifeng Zhang <ruifeng.zhang0110@xxxxxxxxx> wrote:
> > From: Ruifeng Zhang <ruifeng.zhang1@xxxxxxxxxx>
> >
> > Sometimes we want to know which cpu the process is running
> > on when the log output, rather than the thread id. So add
> > the processor id output always in the caller information.
> >
> > caller_id bitmap:
> > [63:32] thread_id
> > [31] flags of in thread context
> > [30:0] processor id
>
> The primary purpose of @caller_id is so that the printk-subsystem can
> coordinate LOG_CONT messages.
>
> Your patch is about logging/printing additional context attributes of
> the printk-caller. This is something we have discussed before [0]. I
> think this should be addressed at some point. But we need to come up
> with a solution that is flexible and generic. We should not be touching
> these core structures every time some new attribute needs to be printed.
>
> Also, this patch is controversial for other reasons:
>
> - it adds bitwise logic, when it could more easily just add a new field
> (for example, caller_cpu)
>
> - it increases the size of all records by 4 bytes
>
> - it changes the internal structure in a way that breaks existing crash
> tools
>
> - for non-task contexts, the increased size is wasted
>
> John Ogness
>
> [0] https://lore.kernel.org/lkml/20200904082438.20707-1-changki.kim@xxxxxxxxxxx