linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Joe Perches <joe@perches.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Petr Mladek <pmladek@suse.cz>, Tejun Heo <tj@kernel.org>,
	Calvin Owens <calvinowens@fb.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: linux.git: printk() problem
Date: Mon, 24 Oct 2016 19:06:13 -0700	[thread overview]
Message-ID: <CA+55aFyDxSd0j7n5ZZgui07Qg1JN-Xm-dtS=oGikM3y0VZ+qHQ@mail.gmail.com> (raw)
In-Reply-To: <20161025015554.GA495@swordfish>

On Mon, Oct 24, 2016 at 6:55 PM, Sergey Senozhatsky
<sergey.senozhatsky.work@gmail.com> wrote:
>
> I think cont_flush() should grab the logbuf_lock lock, because
> it does log_store() and touches the cont.len. so something like
> this perhaps

Absolutely. Good catch.

>> -     if (wake_klogd)
>> +     if (wake_klogd || cont.len)
>                         ^^^^^^^^^^
> this _technically_ can result in additional spurious wakeups - cont.len
> check is done outside of console_sem && logbuf_lock - but I don't think
> this is a huge problem.

Yes. We could easily just do it inside the spinlock and make it part
of the wake_klogd logic, but as you say, it doesn't actually matter.

And yes, it would be lovely if people who use the network console
(which I think is the only user of the whole extended console thing)
would test this too.

It really makes things potentially much simpler. It's not just that it
removes 150 lines, it's 150 lines of  really nasty complex special
case crud.

I'm obviously not going to apply it for 4.9, but it might be "do it
for 4.10 and mark it for stable if nobody notices any issues", because
apart from the code simplification it also gets more cases "right".
Right now the console flushing often means that we end up not merging
continuation lines as much as we could.

           Linus

  reply	other threads:[~2016-10-25  2:06 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12 13:30 linux.git: printk() problem Tetsuo Handa
2016-10-12 14:35 ` Michal Hocko
2016-10-12 16:08   ` Joe Perches
2016-10-13  6:26     ` Michal Hocko
2016-10-13  9:29       ` Joe Perches
2016-10-13 10:04         ` Michal Hocko
2016-10-13 10:20           ` Joe Perches
2016-10-13 11:06             ` Michal Hocko
2016-10-12 15:47 ` Linus Torvalds
2016-10-12 16:16   ` Joe Perches
2016-10-12 16:54     ` Linus Torvalds
2016-10-12 18:50       ` [PATCH] acpi_os_vprintf: Use printk_get_level() to avoid unnecessary KERN_CONT Joe Perches
2016-10-13 21:59         ` Rafael J. Wysocki
2016-10-23  9:22   ` linux.git: printk() problem Geert Uytterhoeven
2016-10-23 18:11     ` Linus Torvalds
2016-10-23 19:06       ` Joe Perches
2016-10-23 19:32         ` Linus Torvalds
2016-10-23 19:46           ` Linus Torvalds
2016-10-24 11:15             ` Geert Uytterhoeven
2016-10-24 14:08             ` Sergey Senozhatsky
2016-10-24 14:23               ` Sergey Senozhatsky
2016-10-24 17:54               ` Linus Torvalds
2016-10-24 17:55                 ` Linus Torvalds
2016-10-25  1:55                   ` Sergey Senozhatsky
2016-10-25  2:06                     ` Linus Torvalds [this message]
2016-10-25  2:22                       ` Linus Torvalds
2016-10-25  4:06                         ` Sergey Senozhatsky
2016-10-25  4:13                           ` Joe Perches
2016-10-25  4:15                           ` Linus Torvalds
2016-10-25  4:44                             ` Sergey Senozhatsky
2016-10-25 14:44                         ` Petr Mladek
2016-11-09 15:47                         ` Petr Mladek
2016-10-25  2:24                     ` Sergey Senozhatsky
2016-10-23 20:33           ` Joe Perches
2016-10-23 21:13             ` Linus Torvalds
2016-10-25 14:42       ` Steven Rostedt

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='CA+55aFyDxSd0j7n5ZZgui07Qg1JN-Xm-dtS=oGikM3y0VZ+qHQ@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=calvinowens@fb.com \
    --cc=geert@linux-m68k.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=pmladek@suse.cz \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=tj@kernel.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 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).