From: Petr Mladek <pmladek@suse.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: sergey.senozhatsky.work@gmail.com, sergey.senozhatsky@gmail.com,
mhocko@kernel.org, pavel@ucw.cz, rostedt@goodmis.org,
andi@lisas.de, jack@suse.cz, dri-devel@lists.freedesktop.org,
linux-mm@kvack.org, daniel.vetter@ffwll.ch
Subject: Re: printk: Should console related code avoid __GFP_DIRECT_RECLAIM memory allocations?
Date: Mon, 10 Jul 2017 14:59:35 +0200 [thread overview]
Message-ID: <20170710125935.GL23069@pathway.suse.cz> (raw)
In-Reply-To: <201707082230.ECB51545.JtFFFVHOOSMLOQ@I-love.SAKURA.ne.jp>
On Sat 2017-07-08 22:30:47, Tetsuo Handa wrote:
> What I want to mention here is that messages which were sent to printk()
> were not printed to not only /dev/tty0 but also /dev/ttyS0 (I'm passing
> "console=ttyS0,115200n8 console=tty0" to kernel command line.) I don't care
> if output to /dev/tty0 is delayed, but I expect that output to /dev/ttyS0
> is not delayed, for I'm anayzing things using printk() output sent to serial
> console (serial.log in my VMware configuration). Hitting this problem when we
> cannot allocate memory results in failing to save printk() output. Oops, it
> is sad.
Would it be acceptable to remove "console=tty0" parameter and push
the messages only to the serial console?
Also there is the patchset from Peter Zijlstra that allows to
use early console all the time, see
https://lkml.kernel.org/r/20161018170830.405990950@infradead.org
The current code flushes each line to all enabled consoles one
by one. If there is a deadlock in one console, everything
gets blocked.
We are trying to make printk() more robust. But it is much more
complicated than we anticipated. Many changes open another can
of worms. It seems to be a job for years.
> Hmm... should we consider addressing console_sem problem before
> introducing printing kernel thread and offloading to that kernel thread?
As Sergey said, the console rework seems to be much bigger task
than introducing the kthread.
Also if we would want to handle each console separately (as a
fallback) it would be helpful to have separate kthread for each
enabled console or for the less reliable consoles at least.
Best Regards,
Petr
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-07-10 12:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-06 10:28 printk: Should console related code avoid __GFP_DIRECT_RECLAIM memory allocations? Tetsuo Handa
2017-07-07 2:39 ` Sergey Senozhatsky
2017-07-07 8:41 ` Daniel Vetter
2017-07-08 13:30 ` Tetsuo Handa
2017-07-10 5:07 ` Sergey Senozhatsky
2017-07-10 12:59 ` Petr Mladek [this message]
2017-07-10 18:07 ` Daniel Vetter
2017-07-11 2:31 ` Sergey Senozhatsky
2017-07-11 4:57 ` Sergey Senozhatsky
2017-07-11 7:50 ` Daniel Vetter
2017-07-11 9:48 ` Sergey Senozhatsky
2017-07-11 11:36 ` Daniel Vetter
2017-07-10 13:33 ` Michal Hocko
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=20170710125935.GL23069@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=andi@lisas.de \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jack@suse.cz \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=pavel@ucw.cz \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=sergey.senozhatsky@gmail.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).