mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: "Jörn Engel" <joern@logfs.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Jeff Moyer <jmoyer@redhat.com>,
	Steve Hodgson <steve@purestorage.com>
Subject: Re: [PATCH] add blockconsole version 1.1
Date: Tue, 24 Jul 2012 18:25:47 +0200	[thread overview]
Message-ID: <20120724162546.GC13753@x1.osrc.amd.com> (raw)
In-Reply-To: <20120724145334.GB24954@logfs.org>

On Tue, Jul 24, 2012 at 10:53:35AM -0400, Jörn Engel wrote:
> On Tue, 24 July 2012 17:42:19 +0200, Borislav Petkov wrote:
> > 
> > Just a minor nuisance: I have this in the log:
> > 
> > ...
> > [   10.498422] console [bcon0] enabled
> > [   10.499899] blockconsole: now logging to /dev/sdc at 1
> > [   10.594791] usb 5-2: new full-speed USB device number 3 using ohci_hcd
> >                                                                                                                                 
> > [   12.665911] xhci_hcd 0000:00:10.0: xHCI Host Controller
> > [   12.668469] xhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 6
> > ...
> > 
> > which doesn't have the empty line with a bunch of '\s' chars:
> > 
> > ...
> > [   10.498422] console [bcon0] enabled
> > [   10.499899] blockconsole: now logging to /dev/sdc at 1
> > [   10.594791] usb 5-2: new full-speed USB device number 3 using ohci_hcd
> > [   12.665911] xhci_hcd 0000:00:10.0: xHCI Host Controller
> > [   12.668469] xhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 6
> > ...
> > 
> > Do you know per-chance why that happens? I have a couple more lines like
> > that further in the log file which bcon_tail generated.
> 
> If there is no logging for a second, blockconsole will flush the
> current sector.  So however much of it is empty will be filled with
> spaces and a newline at the end.  Result are those empty lines.

... and this is consistent with the printk timestamps above: 10.5 to
12.6 seconds = one empty line.

> The advantage should be better robustness, in particular when dealing
> with cheap flash devices.

In the sense that we flush the current sector after one second the
latest so that we can lose as small amount of data as possible if the
system crashes right at that point?

And, at the same time, writes to cheap devices get flushed for sure?

> Disadvantage is the wasted real estate on your monitor - although
> sometimes I have found it nice to have syntax highlighting (in a way)
> for pauses in the logging.

Ok, I see what you mean. I see a red line in vim here. Ok, good to know,
maybe this feature with the empty lines could be in the docs too so
people don't ask that question again?

Or you issue a tag instead of an empty line like so:

[   10.498422] console [bcon0] enabled
[   10.499899] blockconsole: now logging to /dev/sdc at 1
[   10.594791] usb 5-2: new full-speed USB device number 3 using ohci_hcd
<<LOG timeout of 1sec>>
[   12.665911] xhci_hcd 0000:00:10.0: xHCI Host Controller
[   12.668469] xhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 6

which explains everything.

Thanks.

-- 
Regards/Gruss,
Boris.

  reply	other threads:[~2012-07-24 16:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24 20:59 [RFC][PATCH] add blockconsole Jörn Engel
2012-04-25 13:42 ` Jeff Moyer
2012-04-25 13:25   ` Jörn Engel
2012-04-25 15:52     ` Jeff Moyer
2012-07-12 17:46       ` [PATCH] add blockconsole version 1.1 Jörn Engel
2012-07-13 13:03         ` Borislav Petkov
2012-07-13 16:20           ` Jörn Engel
2012-07-13 21:14             ` Borislav Petkov
2012-07-16 12:46             ` Borislav Petkov
2012-07-18 18:53               ` Jörn Engel
2012-07-18 21:45                 ` Borislav Petkov
2012-07-18 21:08                   ` Jörn Engel
2012-07-19  9:26                     ` Borislav Petkov
2012-07-23 20:04                   ` Jörn Engel
2012-07-24 15:42                     ` Borislav Petkov
2012-07-24 14:53                       ` Jörn Engel
2012-07-24 16:25                         ` Borislav Petkov [this message]
2012-07-24 17:52                           ` Jörn Engel
2012-07-24 20:28                             ` Borislav Petkov
2012-12-19 10:20                               ` Borislav Petkov
2012-08-14 11:54                 ` Jan Engelhardt
2012-07-23 14:33         ` Tvrtko Ursulin
2012-07-23 20:02           ` Jörn Engel
2012-07-24  8:01             ` Tvrtko Ursulin
2012-07-24 14:38               ` Jörn Engel
2012-07-25  8:17                 ` Tvrtko Ursulin
2012-07-25 16:39                   ` Jörn Engel

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=20120724162546.GC13753@x1.osrc.amd.com \
    --to=bp@alien8.de \
    --cc=akpm@linux-foundation.org \
    --cc=jmoyer@redhat.com \
    --cc=joern@logfs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=steve@purestorage.com \
    /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

Powered by JetHome