From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: Neaten show_regs, remove KERN_CONT
Date: Mon, 24 Oct 2016 17:42:55 +0100 [thread overview]
Message-ID: <20161024164255.GN15620@leverpostej> (raw)
In-Reply-To: <1477326477.1984.2.camel@perches.com>
On Mon, Oct 24, 2016 at 09:27:57AM -0700, Joe Perches wrote:
> On Mon, 2016-10-24 at 12:31 +0100, Mark Rutland wrote:
> > On Sun, Oct 23, 2016 at 01:40:49PM -0700, Joe Perches wrote:
> > > commit db4b0710fae9 ("arm64: fix show_regs fallout from KERN_CONT changes")
> > > corrected the KERN_CONT fallout from commit 4bcc595ccd80
> > > ("printk: reinstate KERN_CONT for printing continuation lines"), but
> > > the code still has unnecessary KERN_CONT uses. Remove them.
> >
> > Why are these unnecessary KERN_CONTs a larger problem than duplicating
> > the format string for a third time? Having to duplicate it at all was
> > annoying enough.
>
> Not printing partial lines is the best solution to avoiding
> message output interleaving.
Would you mind mentioning that explicitly in the commit message? That
makes it obvious what the benefit of avoiding KERN_CONT is.
> > Overall, to avoid messing with the KERN_CONT mess it'd be nicer to
> > format this all into a buffer (with the format string only existing the
> > once) and subsequently print it with one printk call
>
> A single printk call would get one timestamp which would
> make for ragged/staggered reading.
That does not appear to be the case; as fr as I can tell the core prints a
timestamp per line as required. If I run:
printk("TEST\nLINE1\nLINE2\nLINE3\nLINE4\n");
... with "printk.time=1", over the UART:
[ 41.201864] TEST
[ 41.201864] LINE1
[ 41.201864] LINE2
[ 41.201864] LINE3
[ 41.201864] LINE4
... with "printk.time=1", via the $(dmesg):
[ 41.201864] TEST
[ 41.201864] LINE1
[ 41.201864] LINE2
[ 41.201864] LINE3
[ 41.201864] LINE4
... with "printk.time=0", over the UART:
TEST
LINE1
LINE2
LINE3
LINE4
... with "printk.time=0", via the $(dmesg):
TEST
LINE1
LINE2
LINE3
LINE4
... with "printk.time=0", via $(dmesg -T):
[Mon Oct 24 17:38:37 2016] TEST
[Mon Oct 24 17:38:37 2016] LINE1
[Mon Oct 24 17:38:37 2016] LINE2
[Mon Oct 24 17:38:37 2016] LINE3
[Mon Oct 24 17:38:37 2016] LINE4
Thanks,
Mark.
WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64: Neaten show_regs, remove KERN_CONT
Date: Mon, 24 Oct 2016 17:42:55 +0100 [thread overview]
Message-ID: <20161024164255.GN15620@leverpostej> (raw)
In-Reply-To: <1477326477.1984.2.camel@perches.com>
On Mon, Oct 24, 2016 at 09:27:57AM -0700, Joe Perches wrote:
> On Mon, 2016-10-24 at 12:31 +0100, Mark Rutland wrote:
> > On Sun, Oct 23, 2016 at 01:40:49PM -0700, Joe Perches wrote:
> > > commit db4b0710fae9 ("arm64: fix show_regs fallout from KERN_CONT changes")
> > > corrected the KERN_CONT fallout from commit 4bcc595ccd80
> > > ("printk: reinstate KERN_CONT for printing continuation lines"), but
> > > the code still has unnecessary KERN_CONT uses. Remove them.
> >
> > Why are these unnecessary KERN_CONTs a larger problem than duplicating
> > the format string for a third time? Having to duplicate it at all was
> > annoying enough.
>
> Not printing partial lines is the best solution to avoiding
> message output interleaving.
Would you mind mentioning that explicitly in the commit message? That
makes it obvious what the benefit of avoiding KERN_CONT is.
> > Overall, to avoid messing with the KERN_CONT mess it'd be nicer to
> > format this all into a buffer (with the format string only existing the
> > once) and subsequently print it with one printk call
>
> A single printk call would get one timestamp which would
> make for ragged/staggered reading.
That does not appear to be the case; as fr as I can tell the core prints a
timestamp per line as required. If I run:
printk("TEST\nLINE1\nLINE2\nLINE3\nLINE4\n");
... with "printk.time=1", over the UART:
[ 41.201864] TEST
[ 41.201864] LINE1
[ 41.201864] LINE2
[ 41.201864] LINE3
[ 41.201864] LINE4
... with "printk.time=1", via the $(dmesg):
[ 41.201864] TEST
[ 41.201864] LINE1
[ 41.201864] LINE2
[ 41.201864] LINE3
[ 41.201864] LINE4
... with "printk.time=0", over the UART:
TEST
LINE1
LINE2
LINE3
LINE4
... with "printk.time=0", via the $(dmesg):
TEST
LINE1
LINE2
LINE3
LINE4
... with "printk.time=0", via $(dmesg -T):
[Mon Oct 24 17:38:37 2016] TEST
[Mon Oct 24 17:38:37 2016] LINE1
[Mon Oct 24 17:38:37 2016] LINE2
[Mon Oct 24 17:38:37 2016] LINE3
[Mon Oct 24 17:38:37 2016] LINE4
Thanks,
Mark.
next prev parent reply other threads:[~2016-10-24 16:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-23 20:40 [PATCH] arm64: Neaten show_regs, remove KERN_CONT Joe Perches
2016-10-23 20:40 ` Joe Perches
2016-10-24 11:31 ` Mark Rutland
2016-10-24 11:31 ` Mark Rutland
2016-10-24 16:27 ` Joe Perches
2016-10-24 16:27 ` Joe Perches
2016-10-24 16:42 ` Mark Rutland [this message]
2016-10-24 16:42 ` Mark Rutland
2016-10-25 17:38 ` Linus Torvalds
2016-10-25 17:38 ` Linus Torvalds
2016-10-25 17:55 ` Linus Torvalds
2016-10-25 17:55 ` Linus Torvalds
2016-10-25 18:05 ` Joe Perches
2016-10-25 18:05 ` Joe Perches
2016-10-25 18:04 ` Mark Rutland
2016-10-25 18:04 ` Mark Rutland
2016-10-25 14:32 ` Mark Rutland
2016-10-25 14:32 ` Mark Rutland
2016-10-25 16:44 ` Joe Perches
2016-10-25 16:44 ` Joe Perches
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=20161024164255.GN15620@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.