From: Jan Kara <jack@suse.cz>
To: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jan Kara <jack@suse.cz>, LKML <linux-kernel@vger.kernel.org>,
pmladek@suse.cz, Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH 5/6] printk: Hand over printing to console if printing too long
Date: Fri, 14 Mar 2014 13:26:21 +0100 [thread overview]
Message-ID: <20140314122621.GC18583@quack.suse.cz> (raw)
In-Reply-To: <20140313232636.02766d06@alan.etchedpixels.co.uk>
On Thu 13-03-14 23:26:36, One Thousand Gnomes wrote:
> > Creating yet more kernel threads to solve this problem is a bit sad.
> > Is there no way in which we can borrow one of the existing threads?
>
> schedule_work()
>
> Surely that's all we need, if we get bunged up for a bit then it ends up
> on a work queue item and everyone with a billion disks and a 9600 baud
> serial port is still happy. Nobody else will ever see it.
Yes, I know about schedule_work() and I've used it about an year (and ~10
patchset iterations) ago when first trying to solve this problem. The
problem with using workqueues is that if workqueue code ever does printk()
while holding some workqueue lock, we could deadlock when trying to do
schedule_work() from printk which might need the same lock. And people were
objecting to restricting workqueue code to not call printk(). That's why
I've chosen dedicated kthreads were we have tight control over what they
do.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2014-03-14 12:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 15:58 [PATCH 0/6 v2] printk: Cleanups and softlockup avoidance Jan Kara
2014-03-13 15:58 ` [PATCH 1/6] printk: Remove outdated comment Jan Kara
2014-03-13 15:58 ` [PATCH 2/6] printk: Release lockbuf_lock before calling console_trylock_for_printk() Jan Kara
2014-03-13 15:58 ` [PATCH 3/6] printk: Enable interrupts " Jan Kara
2014-03-13 15:58 ` [PATCH 4/6] printk: Remove separate printk_sched buffers and use printk buf instead Jan Kara
2014-03-13 15:58 ` [PATCH 5/6] printk: Hand over printing to console if printing too long Jan Kara
2014-03-13 23:06 ` Andrew Morton
2014-03-13 23:26 ` One Thousand Gnomes
2014-03-14 12:26 ` Jan Kara [this message]
2014-03-14 13:00 ` Jan Kara
2014-03-14 13:30 ` Jan Kara
2014-03-13 15:58 ` [PATCH 6/6] kernel: Avoid softlockups in stop_machine() during heavy printing Jan Kara
2014-03-13 23:09 ` Andrew Morton
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=20140314122621.GC18583@quack.suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.cz \
--cc=rostedt@goodmis.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
all inboxes | Powered by JetHome®