[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200924132630.GE29288@alley>
Date: Thu, 24 Sep 2020 15:26:30 +0200
From: Petr Mladek <pmladek@...e.com>
To: John Ogness <john.ogness@...utronix.de>
Cc: Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Prarit Bhargava <prarit@...hat.com>,
Mark Salyzyn <salyzyn@...roid.com>,
Chunyan Zhang <zhang.lyra@...il.com>,
Orson Zhai <orsonzhai@...il.com>,
Changki Kim <changki.kim@...sung.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC 2/2] printk: Add more information about the printk caller
On Thu 2020-09-24 10:29:31, John Ogness wrote:
> On 2020-09-24, Sergey Senozhatsky <sergey.senozhatsky@...il.com> wrote:
> > A question. Suppose we have a task which does
> >
> > CPU0
> >
> > pr_err(...);
> >
> > preempt_disable();
> > pr_err(...);
> > preempt_enable();
> >
> > pr_err(...);
> >
> > rcu_read_lock();
> > pr_info(...);
> > rcu_read_unlock();
> >
> > Should we distinguish those as 3 different contexts?
> >
> > - normal printk
> > - printk under disabled preemption (affects scheduling)
> > - printk under RCU read side lock (affects RCU grace periods)
>
> The internal purpose of the printk_info's @caller_id is to support
> _some_ sanity with LOG_CONT. True LOG_CONT sanity will not be available
> until we provide a context API like we previously talked about [0]. But
> for now it is good enough (even if it is not good).
>
> We can also store various flags and counters to describe the current
> context. But these would only exist to provide the user with information
> rather than because printk itself needs it. I only mention this so that
> we don't get things mixed up. We can add as much information as want,
> but LOG_CONT will only be interested in a subset of that.
Yeah, we need to keep this in mind, so that some "tiny" changes in the
context would not prevent concatenating related pieces of the message.
Best Regards,
Petr
Powered by blists - more mailing lists