From: Peter Zijlstra <peterz@infradead.org>
To: Petr Mladek <pmladek@suse.com>
Cc: sergey.senozhatsky@gmail.com, linux-kernel@vger.kernel.org,
rostedt@goodmis.org, mingo@kernel.org, tglx@linutronix.de,
Jason Wessel <jason.wessel@windriver.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement
Date: Thu, 12 Oct 2017 13:34:39 +0200 [thread overview]
Message-ID: <20171012113439.3temezwthmrz3pbu@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20171012100304.GD2882@pathway.suse.cz>
On Thu, Oct 12, 2017 at 12:03:04PM +0200, Petr Mladek wrote:
> On Thu 2017-10-12 11:45:37, Petr Mladek wrote:
> > Hi,
> >
> > I thought about this a lot from several angles. And I would prefer
> > sligly different placement, see the patch below.
> >
> > On Thu 2017-09-28 14:18:24, Peter Zijlstra wrote:
> > > Some people figured vprintk_emit() makes for a nice API and exported
> > > it, bypassing the kdb trap.
> >
> > Sigh, printk() API is pretty complicated and this export
> > made it much worse. Well, there are two things:
> >
> > First, kdb_trap_printk name is a bit misleading. It is not a
> > generic trap of any printk message. Instead it seems to be
> > used to redirect only particular messages from some existing
> > functions, e.g. show_regs() called from kdb_dumpregs().
> >
> > Second, it seems that the only user of the exported vprintk_emit()
> > is dev_vprintk_emit(). I believe that code using this wrapper
> > is not called in the sections where kdb_trap_printk is incremented.
>
> Well, I wonder if we should go even further and stop exporting
> vprintk_emit(). IMHO, the only reason was dev_print_emit() and
> the ability to pass the extra "dict" parameter.
You have my blessing there, but the device folks might have an opinion
on that; Cc'ed Gregkh.
> My aim is to redirect all the exported interfaces into vprintk_func
> (need another name?) where the right implementation will be chosen
> by the context (NMI, printk_safe, kdb, deferred?, printk_early, normal).
>
> In each case, I would like to have all these re-directions on a single
> place to make the printk() code better readable.
>
> IMHO, it would make sense to do this clean up first before
> this patchset adds more twists. But I am afraid that we will
> meet some problems and it make take longer. I am open for
> opinions.
>
> Best Regards,
> Petr
next prev parent reply other threads:[~2017-10-12 11:34 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-28 12:18 [PATCH 0/3] printk: Add force_early_printk boot param Peter Zijlstra
2017-09-28 12:18 ` [PATCH 1/3] printk: Fix kdb_trap_printk placement Peter Zijlstra
2017-10-03 22:10 ` Steven Rostedt
2017-10-05 13:38 ` Petr Mladek
2017-10-05 13:42 ` Peter Zijlstra
2017-10-09 15:05 ` Petr Mladek
2017-10-12 9:45 ` Petr Mladek
2017-10-12 10:03 ` Petr Mladek
2017-10-12 11:34 ` Peter Zijlstra [this message]
2017-10-12 11:52 ` Greg Kroah-Hartman
2017-10-12 12:08 ` Greg Kroah-Hartman
2017-10-12 18:11 ` Joe Perches
2017-10-13 14:23 ` Petr Mladek
2017-10-12 11:30 ` Peter Zijlstra
2017-09-28 12:18 ` [PATCH 2/3] early_printk: Add force_early_printk kernel parameter Peter Zijlstra
2017-09-28 15:41 ` Randy Dunlap
2017-09-28 16:07 ` Peter Zijlstra
2017-09-28 17:05 ` Randy Dunlap
2017-10-03 22:18 ` Steven Rostedt
2017-10-12 10:24 ` Petr Mladek
2017-10-12 11:39 ` Peter Zijlstra
2017-10-13 13:06 ` Petr Mladek
2017-10-13 13:20 ` Peter Zijlstra
2017-10-13 13:30 ` Steven Rostedt
2017-09-28 12:18 ` [PATCH 3/3] early_printk: Add simple serialization to early_vprintk() Peter Zijlstra
2017-10-03 22:24 ` Steven Rostedt
2017-10-04 9:08 ` Peter Zijlstra
2017-10-04 13:04 ` Steven Rostedt
2017-10-04 13:08 ` Peter Zijlstra
2017-10-04 14:17 ` Paul E. McKenney
2017-10-04 14:43 ` Steven Rostedt
2017-10-04 14:52 ` Peter Zijlstra
2017-10-04 15:02 ` Steven Rostedt
2017-10-04 15:14 ` Paul E. McKenney
2017-10-04 15:24 ` Peter Zijlstra
2017-10-04 15:38 ` Paul E. McKenney
2017-09-28 16:02 ` [PATCH 0/3] printk: Add force_early_printk boot param Sergey Senozhatsky
2017-09-28 16:17 ` Peter Zijlstra
-- strict thread matches above, loose matches on Subject: below --
2016-10-18 17:08 [PATCH 0/3] make printk work again Peter Zijlstra
2016-10-18 17:08 ` [PATCH 1/3] printk: Fix kdb_trap_printk placement Peter Zijlstra
2016-10-19 14:41 ` Petr Mladek
2016-10-19 15:18 ` Peter Zijlstra
2016-10-20 13:02 ` Sergey Senozhatsky
2016-11-29 13:54 ` Petr Mladek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171012113439.3temezwthmrz3pbu@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=jason.wessel@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).