linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Jonathan Richardson <jonathan.richardson@broadcom.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	gregkh@linuxfoundation.org, jslaby@suse.com,
	sergey.senozhatsky@gmail.com, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Scott Branden <scott.branden@broadcom.com>,
	Ray Jui <ray.jui@broadcom.com>,
	Srinath Mannam <srinath.mannam@broadcom.com>
Subject: Re: console output duplicated when registering additional consoles
Date: Thu, 21 Nov 2019 10:33:20 +0100	[thread overview]
Message-ID: <20191121093320.v6ki2zu2tktcj357@pathway.suse.cz> (raw)
In-Reply-To: <CAHrpVsV2Y4ZNRSJ58J0f_E0=aC8VfwvO56mfcdkXxCsJbAF3qA@mail.gmail.com>

On Tue 2019-11-19 10:46:22, Jonathan Richardson wrote:
> > > not just when a normal con replaces a bootconsole. A simple way of
> > > avoiding the problem I'm seeing is to not even set the CON_PRINTBUFFER
> > > flag on my consoles.
> >
> > This is up to the console driver to decide.
> >
> > > It skips the replay and the output on all consoles looks fine. The flag
> > > is only used by register_console(), although I don't think that is the
> > > intended usage? There are no console drivers that do this.
> >
> > Not sure I'm following. There are consoles that want all logbuf messages
> > once those consoles are available.
> 
> I meant mine would be the only driver that didn't set CON_PRINTBUFFER.
> Thanks for clarifying why it would be set. I guess what I didn't
> understand is why are all the consoles updated (potentially) when a
> new console is registered. As I mentioned before I can not set
> CON_PRINTBUFFER to avoid the issue but it's probably not what I want.
> I would possibly lose some of the log I guess if there was something
> in the buffer during registration of the new console.

Exactly, many things happen before and during the console
registration. There might already be (are) several messages when
new consoles are registered.

Now, people register more different consoles for different purpose.
For example, one is shown on a display, another can be stored by
an external device. It makes sense to show all messages on
all interfaces.

It can cause duplicated messages because there is no support to match
proper console with the early one. The current console registration
code somehow works only with one early console.

Best Regards,
Petr

  reply	other threads:[~2019-11-21  9:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07  1:09 console output duplicated when registering additional consoles Jonathan Richardson
2019-11-14  1:28 ` Jonathan Richardson
2019-11-14  9:57   ` Petr Mladek
2019-11-15  4:33     ` Sergey Senozhatsky
2019-11-18 21:38       ` Jonathan Richardson
2019-11-19  0:34         ` Sergey Senozhatsky
2019-11-19 18:46           ` Jonathan Richardson
2019-11-21  9:33             ` Petr Mladek [this message]
2019-11-19 11:30         ` Petr Mladek
2019-11-19 18:36           ` Jonathan Richardson
2019-11-20  0:28           ` Sergey Senozhatsky

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=20191121093320.v6ki2zu2tktcj357@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jonathan.richardson@broadcom.com \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=ray.jui@broadcom.com \
    --cc=scott.branden@broadcom.com \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=srinath.mannam@broadcom.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;
as well as URLs for NNTP newsgroup(s).