All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	tj@kernel.org, akpm@linux-foundation.org, calvinowens@fb.com,
	davej@codemonkey.org.uk, jack@suse.com, kyle@kernel.org,
	stable@vger.kernel.org, mm-commits@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: + printk-do-cond_resched-between-lines-while-outputting-to-consoles.patch added to -mm tree
Date: Fri, 4 Dec 2015 09:29:45 +0900	[thread overview]
Message-ID: <20151204002945.GA3313@swordfish> (raw)
In-Reply-To: <20151203095739.GA21988@quack.suse.cz>

On (12/03/15 10:57), Jan Kara wrote:
[..]
> > > CPU2 still can cause lots of troubles. consider
> > > 
> > > CPU0		CPU1			CPU2
> > > printk		
> > > ...		printk_deferred		
> > > printk					wake_up_klogd
> > > 						wake_up_klogd_work_func
> > > 							console_trylock
> > > 								console_unlock
> > > 
> > > printk_deferred() may be issued by scheduler, for example.
> > 
> > IOW, may be we can start limiting the number of bytes printed in console_unlock()
> > from irq contexts. Which is quite ugly, yes. We basically don't know how much time
> > we spend in call_console_drivers(); some of the consoles can do 'internal' spin_lock
> > loops in ->write() handlers, etc. So something like this (below) probably will not
> > really help, but still it's not always OK to do `while (1)' loop in console_unlock()
> > for irqs.
> 
> What we really want is pushing the printing into async context (unless
> forced by debug option or oops in progress). Because what you do here fixes
> only a small fraction of the problem space. I have patches which fix more
> of it (https://lkml.org/lkml/2015/10/26/16) but they are still not enough
> because on large machines e.g. udev times out because printing messages
> about inserted hardware over serial console just takes too long.

absolutely agree. thanks for the link!

	-ss

      reply	other threads:[~2015-12-04  0:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02 23:57 + printk-do-cond_resched-between-lines-while-outputting-to-consoles.patch added to -mm tree akpm
2015-12-03  1:11 ` Sergey Senozhatsky
2015-12-03  2:39   ` Sergey Senozhatsky
2015-12-03  9:57     ` Jan Kara
2015-12-04  0:29       ` Sergey Senozhatsky [this message]

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=20151204002945.GA3313@swordfish \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=calvinowens@fb.com \
    --cc=davej@codemonkey.org.uk \
    --cc=jack@suse.com \
    --cc=jack@suse.cz \
    --cc=kyle@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --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 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.