public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Petr Vandrovec" <VANDROVE@vc.cvut.cz>
To: Marcin Dalecki <dalecki@evision.ag>
Cc: linux-kernel@vger.kernel.org
Subject: Re: IDE from current bk tree, UDMA and two channels...
Date: Tue, 30 Jul 2002 18:15:13 +0200	[thread overview]
Message-ID: <986F8B232B@vcnet.vc.cvut.cz> (raw)

On 30 Jul 02 at 16:25, Marcin Dalecki wrote:
> > Second problem is that read operation which ends with
> > "drive ready, seek complete, data request" (why it happened in first
> > place?) will just read one sector from drive (it was DMA transfer,
> > so drive->mult_count == 0), and then it returns from ata_error
> > with ATA_OP_CONTINUES. But what continues? Drive told us that
> > current operation is done, and no new operation was started, so
> > there is very low chance that some IRQ will ever come, and timer was
> > just removed by ata_irq_request(), so channel will never awake.
> 
> What should continue is the retry of the operation, since otherwise
> it will be abondoned in do_ide_request(). However I will recheck.

It looks to me like that we only issue idle immediate and reset
to the drive. And even if we reset drive, we do not reissue
command, not even talking about resetting handler. And because of 
ide_dma_intr -> ata_error will report ATA_OP_CONTINUES, ata_irq_request 
will think that handler reissued command, and it will leave IDE_BUSY set.
So we are left with IDE_BUSY set, idle hardware, no handler and no timer 
active, and with one request on the fly lost somewhere in the system.
Probably code which reissued hardware was dropped sometime in the past
changes?

Another problem I found: ata_error calls ata_status_poll, which can
call back to ata_error. Hardwiring BUSY_STAT bit to 1 (== unplugging
drive from system, for example) can cause this loop, as far as I can see.
Fortunately on my system it reads 0x7F from status register after disk
unplug, but it still does not look correct.
 
> > And last thing: problem does not happen when only one of channels is
> > active, it is triggered only when both channels are active, and
> > channel #1 is always one which dies. Channel #0 uses IRQ14, channel #1
> > IRQ15, so there should be no sharing involved.
> 
> Do you do unmasking of IRQs? Holding them a bit longer could have some
> impact as well...

It was happening with default configuration, with unmaskirq=1. Now I tried

hdparm -u 0 /dev/hda; hdparm -u 0 /dev/hdc
vmware-config.pl -default & fsck -f /dev/hdc1

and it again died. vmware-config.pl is used as simple compile test,
it happens with 'ls -lRta /' too, but with 'vmware-config.pl' it happens
much faster.

Stack trace when this problem happens is:

ide_dma_intr + b8/cc (here I added printstate() call)
ata_irq_request + 11e/1cc
handle_IRQ_event + 29/4c
do_IRQ + df/190
common_interrupt + 18/20
madvise_willneed + 10/94
radix_tree_lookup + 18/60
do_page_cache_readahead + 92/13c
do_generic_file_read + 57/2a8
generic_file_read + 11c/138
file_read_actor + 0/8c
vfs_read + b4/134
sys_read + 2a/3c
syscall_call + 7/b

It is UP machine (with SMP non-preemptible kernel). Stack trace does not 
look like that it was caused by some race.
                                                Best regards,
                                                    Petr Vandrovec
                                                    vandrove@vc.cvut.cz
                                                    

             reply	other threads:[~2002-07-30 16:12 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-30 16:15 Petr Vandrovec [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-08-01 23:13 IDE from current bk tree, UDMA and two channels Petr Vandrovec
2002-08-02 13:07 ` Alan Cox
2002-08-01 23:00 Petr Vandrovec
2002-08-01 23:05 ` Alexander Viro
2002-08-01 22:53 Petr Vandrovec
2002-08-01 23:02 ` Alexander Viro
2002-08-01 23:54 ` Linus Torvalds
     [not found] <200208012219.g71MJV109133@penguin.transmeta.com>
2002-08-01 22:45 ` Alexander Viro
2002-08-02  9:10   ` Marcin Dalecki
2002-08-01 22:42 Petr Vandrovec
2002-08-01 22:52 ` Alexander Viro
2002-08-02  9:11   ` Marcin Dalecki
2002-08-01 22:34 Petr Vandrovec
2002-08-01 17:07 Petr Vandrovec
2002-08-01 22:00 ` Petr Vandrovec
2002-08-01 22:13   ` Marcin Dalecki
2002-08-01 22:39     ` Alexander Viro
2002-07-30 19:26 Petr Vandrovec
2002-07-31 20:01 ` Marcin Dalecki
2002-08-01  9:56   ` Jens Axboe
2002-08-01  9:56     ` Marcin Dalecki
2002-08-01 10:05       ` Jens Axboe
2002-08-01 10:33         ` Marcin Dalecki
2002-08-01 10:45           ` Jens Axboe
2002-07-30 18:19 Petr Vandrovec
2002-07-31 19:48 ` Marcin Dalecki
2002-07-30 14:03 Petr Vandrovec
2002-07-30 14:25 ` Marcin Dalecki

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=986F8B232B@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