LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Stephane Eranian <eranian@hpl.hp.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jiri Slaby <jirislaby@gmail.com>, Uwe Bugla <uwe.bugla@gmx.de>,
	akpm@linux-foundation.org, bunk@stusta.de,
	linux-kernel@vger.kernel.org, Andi Kleen <ak@suse.de>,
	venkatesh.pallipadi@intel.com
Subject: Re: bug in kernel 2.6.21-rc1-git1: conventional floppy drive cannot be mounted without hanging up the whole system
Date: Mon, 26 Feb 2007 09:28:55 -0800	[thread overview]
Message-ID: <20070226172855.GB19403@frankl.hpl.hp.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0702260741040.12485@woody.linux-foundation.org>

Hi,

On Mon, Feb 26, 2007 at 07:51:19AM -0800, Linus Torvalds wrote:
> 
> 
> On Mon, 26 Feb 2007, Jiri Slaby wrote:
> > 
> > Ok, this commit is the culprit:
> > Commit: 2ff2d3d74705d34ab71b21f54634fcf50d57bdd5
> > Author: Stephane Eranian <eranian@hpl.hp.com> Tue, 13 Feb 2007 13:26:22 +0100
> > 
> >     [PATCH] i386: add idle notifier
> 
> Interesting. It doesn't touch floppy at all, but it *does* seem to play 
> around with irq state. 
> 
> In particular, the floppy uses IRQF_DISABLED (which means that it doesn't 
> want interrupts enabled when in the irq handler), and I get the feeling 
> that the poll_idle() stuff made that not work.
> 
> That said, the only thing that *really* seems to change (as far as a 
> floopy driver could notice) is the added "exit_idle()" in the do_IRQ() 
> sequence, and I'm not seeing that one enabling interrupts. 
> 
> But the idle sequence definitely does (ie now we disable/enable interrupts 
> in cpu_idle(). I'm not seeing why that should matter, though.
> 
> Stephane, any ideas?
> 
I think this may be related to the issue fixed by Venkatesh here:
	http://www.ussg.iu.edu/hypermail/linux/kernel/0611.3/1264.html

The same code was used for i386 but I think for both architectures, the patch
is missing default_idle(). I believe deault idle should look as follows:

void default_idle(void)
{
        if (!hlt_counter && boot_cpu_data.hlt_works_ok) {
                current_thread_info()->status &= ~TS_POLLING;
                /*
                 * TS_POLLING-cleared state must be visible before we
                 * test NEED_RESCHED:
                 */
                smp_mb();

                local_irq_disable();
                if (!need_resched())
                        safe_halt();    /* enables interrupts racelessly */
                else
                        local_irq_enable();
                current_thread_info()->status |= TS_POLLING;
        } else {
                /* loop is done by the caller */
---->		local_irq_enable();
                cpu_relax();
        }
}
I do not have any machine with floppy drives. Could you try this?

Thanks.

-- 
-Stephane

  parent reply	other threads:[~2007-02-26 17:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-24 17:54 Uwe Bugla
2007-02-24 18:07 ` Andrew Morton
2007-02-24 18:29   ` Uwe Bugla
2007-02-24 19:23   ` Uwe Bugla
2007-02-24 19:49     ` Ray Lee
2007-02-26 10:38 ` Jiri Slaby
2007-02-26 15:12   ` Jiri Slaby
2007-02-26 15:51     ` Linus Torvalds
2007-02-26 16:28       ` Jiri Slaby
2007-02-26 16:34       ` Benjamin LaHaise
2007-02-26 17:10         ` Linus Torvalds
2007-02-26 17:45           ` Stephane Eranian
2007-02-26 17:28       ` Stephane Eranian [this message]
2007-02-26 17:37         ` Linus Torvalds
2007-02-25 18:29 Uwe Bugla
2007-02-25 21:04 ` Alexey Dobriyan
2007-02-26  3:55 ` Mike Galbraith
2007-02-26 18:06 Oleg Nesterov
2007-02-26 18:13 ` Linus Torvalds
2007-02-26 20:55   ` Rene Herman
2007-02-26 21:14     ` Linus Torvalds
2007-02-28  2:42       ` Bill Davidsen
2007-02-28 13:04         ` Alan
2007-02-28 12:20           ` Rene Herman

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=20070226172855.GB19403@frankl.hpl.hp.com \
    --to=eranian@hpl.hp.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=bunk@stusta.de \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=uwe.bugla@gmx.de \
    --cc=venkatesh.pallipadi@intel.com \
    --subject='Re: bug in kernel 2.6.21-rc1-git1: conventional floppy drive cannot be mounted without hanging up the whole system' \
    /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

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).