public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Petr Vandrovec" <VANDROVE@vc.cvut.cz>
To: dalecki@evision.ag
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: IDE lockups with 2.5.28...
Date: Thu, 25 Jul 2002 19:22:14 +0200	[thread overview]
Message-ID: <218BBF1744@vcnet.vc.cvut.cz> (raw)

Martin,
   can you explain what local_irq_disable() in do_request in
drivers/ide/ide.c should guard against? There is dozen (all unless I 
missed something) of paths which do not local_irq_enable(), and neither 
does the caller...

And what you meant with (endless) loop in ide_do_request?

And where do_request() callers obtain channel lock so that do_request()
can release and reacquire it?

My problem is that fsck reliable dies between 79.6 and 81% of its
run - on UP machine with SMP kernel:

NMI detected lockup on CPU0 ...

Stack trace: do_request + 315/924
             do_ide_request
             generic_unplug_device
             blk_run_queues
             do_page_cache_readahead
             page_cache_readahead
             do_generic_file_read
             generic_file_read
             file_read_actor
             vfs_read
             sys_read

do_request+315 is clear_bit(IDE_BUSY, channel->active) at line 606.

The do_ide_request()'s loop

while (!test_and_set_bit(IDE_BUSY, ch->active)) {
  do_request(ch)
}

looks very suspicious to me - it will loop here until the end of world,
as there is nothing in queue, so do_request() will always exit
with IDE_BUSY cleared.

Next question is: with this stack trace, where you obtained ch->lock,
so that do_request() can do call to spin_unlock(ch->lock) ? It looks
to me like that I should get 'unlocking unlocked spinlock' with
appropriate debug.

What (probably) happened is that hardware finished request before 
spin_lock_irq(ch->lock) (at line 749) was executed, we quit with
IDE_BUSY cleared, and it was last thing we did... Maybe I should
go back to IDE-98?
                                            Thanks,
                                                Petr Vandrovec
                                                vandrove@vc.cvut.cz
                                                

             reply	other threads:[~2002-07-25 17:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-25 17:22 Petr Vandrovec [this message]
2002-07-26  2:09 ` IDE lockups with 2.5.28 Marcin Dalecki
  -- strict thread matches above, loose matches on Subject: below --
2002-07-26 10:00 Petr Vandrovec
2002-07-26 10:30 ` Marcin Dalecki
2002-07-26 10:30 Petr Vandrovec
2002-07-26 10:31 ` Marcin Dalecki
2002-07-26 10:46 Petr Vandrovec

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=218BBF1744@vcnet.vc.cvut.cz \
    --to=vandrove@vc.cvut.cz \
    --cc=dalecki@evision.ag \
    --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