[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGETcx_7_r7NJb+uU05YxzJu1QZfvMBxwOo2M_wK6JU_h=wJKw@mail.gmail.com>
Date: Thu, 7 Apr 2022 17:44:31 -0700
From: Saravana Kannan <saravanak@...gle.com>
To: pmladek@...e.com
Cc: Chunlei.wang@...iatek.com, john.ogness@...utronix.de,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
LKML <linux-kernel@...r.kernel.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@...ts.infradead.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Steven Rostedt <rostedt@...dmis.org>, senozhatsky@...omium.org,
Android Kernel Team <kernel-team@...roid.com>
Subject: Re: [PATCH v2] printk: ringbuffer: Improve prb_next_seq() performance
Messed up mail headers. I'll resend this with proper mail headers.
-Saravana
On Thu, Apr 7, 2022 at 5:36 PM Saravana Kannan <saravanak@...gle.com> wrote:
>
> > --- a/kernel/printk/printk_ringbuffer.h
> > +++ b/kernel/printk/printk_ringbuffer.h
> > @@ -75,6 +75,7 @@ struct prb_desc_ring {
> > struct printk_info *infos;
> > atomic_long_t head_id;
> > atomic_long_t tail_id;
> > + atomic_long_t last_finalized_id;
>
> I really know nothing about this code, but while looking around
> kernel/printk/ I noticed kernel/printk/printk.c has these lines in
> log_buf_vmcoreinfo_setup().
>
> VMCOREINFO_STRUCT_SIZE(prb_desc_ring);
> VMCOREINFO_OFFSET(prb_desc_ring, count_bits);
> VMCOREINFO_OFFSET(prb_desc_ring, descs);
> VMCOREINFO_OFFSET(prb_desc_ring, infos);
> VMCOREINFO_OFFSET(prb_desc_ring, head_id);
> VMCOREINFO_OFFSET(prb_desc_ring, tail_id);
>
> Would this header file change also require a change to that location?
> Something like
>
> VMCOREINFO_OFFSET(prb_desc_ring, head_id);
> VMCOREINFO_OFFSET(prb_desc_ring, tail_id);
> + VMCOREINFO_OFFSET(prb_desc_ring, last_finalized_id);
>
> -Saravana
>
> > };
> >
> > /*
> > @@ -258,6 +259,7 @@ static struct printk_ringbuffer name = { \
> > .infos = &_##name##_infos[0], \
> > .head_id = ATOMIC_INIT(DESC0_ID(descbits)), \
> > .tail_id = ATOMIC_INIT(DESC0_ID(descbits)), \
> > + .last_finalized_id = ATOMIC_INIT(DESC0_ID(descbits)), \
> > }, \
> > .text_data_ring = { \
> > .size_bits = (avgtextbits) + (descbits), \
Powered by blists - more mailing lists