From: Jan Kara <jack@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jan Kara <jack@suse.cz>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
LKML <linux-kernel@vger.kernel.org>,
jslaby@suse.cz
Subject: Re: [PATCH] printk: Avoid softlockups in console_unlock()
Date: Thu, 31 Jan 2013 13:46:25 +0100 [thread overview]
Message-ID: <20130131124625.GB4612@quack.suse.cz> (raw)
In-Reply-To: <20130130160827.cadb3262.akpm@linux-foundation.org>
On Wed 30-01-13 16:08:27, Andrew Morton wrote:
> On Tue, 29 Jan 2013 15:54:24 +0100
> Jan Kara <jack@suse.cz> wrote:
>
> > > So I was testing the attached patch which does what we discussed. The bad
> > > news is I was able to trigger a situation (twice) when suddently sda
> > > disappeared and thus all IO requests failed with EIO. There is no trace of
> > > what's happened in the kernel log. I'm guessing that disabled interrupts on
> > > the printing CPU caused scsi layer to time out for some request and fail the
> > > device. So where do we go from here?
> > Andrew? I guess this fell off your radar via the "hrm, strange, need to
> > have a closer look later" path?
>
> urgh. I was hoping that if we left it long enough, one of both of us
> would die :(
I'm too young for this strategy to work for me :)
> I fear we will rue the day when we changed printk() to bounce some of
> its work up to a kernel thread.
>
> > Currently I'd be inclined to return to my original solution...
>
> Can we make it smarter? Say, take a peek at the current
> softlockup/nmi-watchdog intervals, work out how for how long we can
> afford to keep interrupts disabled and then use that period and
> sched_clock() to work out if we're getting into trouble? IOW, remove
> the hard-wired "1000" thing which will always be too high or too low
> for all situations.
Yes, I also thought that making offloading more clever (so that offload
doesn't happen unless we really have no choice) could make the approach
more acceptable.
> Implementation-wise, that would probably end up adding a kernel-wide
> function along the lines of
>
> /*
> * Return the maximum number of nanosecond for which interrupts may be disabled
> * on the current CPU
> */
> u64 max_interrupt_disabled_duration(void)
> {
> return min(sortirq duration, nmi watchdog duration);
> }
OK, that sounds good. So I'll write some patch...
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2013-01-31 12:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 17:58 [PATCH] printk: Avoid softlockups in console_unlock() Jan Kara
2013-01-16 7:37 ` Andrew Morton
2013-01-16 10:16 ` Jan Kara
2013-01-16 22:50 ` Andrew Morton
2013-01-16 23:55 ` Jan Kara
2013-01-17 0:11 ` Andrew Morton
2013-01-17 21:04 ` Jan Kara
2013-01-17 21:39 ` Andrew Morton
2013-01-17 23:46 ` Jan Kara
2013-01-17 23:50 ` Andrew Morton
2013-01-21 21:00 ` Jan Kara
2013-01-29 14:54 ` Jan Kara
2013-01-31 0:08 ` Andrew Morton
2013-01-31 12:46 ` Jan Kara [this message]
2013-01-31 7:44 ` anish singh
2013-01-31 21:21 ` 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=20130131124625.GB4612@quack.suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.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).