public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: schwidefsky@de.ibm.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: plug problem in linux-2.4.0-test11
Date: Wed, 27 Dec 2000 21:04:26 +0100	[thread overview]
Message-ID: <20001227210426.B10446@athlon.random> (raw)
In-Reply-To: <C12569A6.00425037.00@d12mta07.de.ibm.com>
In-Reply-To: <C12569A6.00425037.00@d12mta07.de.ibm.com>; from schwidefsky@de.ibm.com on Wed, Nov 29, 2000 at 12:56:44PM +0100


On Wed, Nov 29, 2000 at 12:56:44PM +0100, schwidefsky@de.ibm.com wrote:
> 
> 
> Hi,
> I experienced disk hangs with linux-2.4.0-test11 on S/390 and after
> some debugging I found the cause. It the new method of unplugging
> block devices that doesn't go along with the S/390 disk driver:
> 
> /*
>  * remove the plug and let it rip..
>  */
> static inline void __generic_unplug_device(request_queue_t *q)
> {
>         if (!list_empty(&q->queue_head)) {
>                 q->plugged = 0;
>                 q->request_fn(q);
>         }
> }
> 
> The story goes like this: at start the request queue was empty but
> the disk driver was still working on an older, already dequeued
> request. Someone plugged the device (q->plugged = 1 && queue on
> tq_disk). Then a new request arrived and the unplugging was
> started. But before __generic_unplug_device was reached the
> outstanding request finished. The bottom half of the S/390 disk
> drivers always checks for queued requests after an interrupt,
> starts the first and dequeues some of the requests on the
> request queue to put them on its internal queue. You could argue
> that it shouldn't dequeue request if q->plugged == 1. On the other

Yes I argue exactly that ;). That's a bug in the driver. For example if the
driver is an headactive device (q->headactive == 1) then the bug will also
corrupt memory (probably it isn't an headactive device because you said it
moves the request into its private lists). Otherwise it only forbids the
elevator to merge requests and optimze seeks away.

I think right behaviour of the blkdev layer is to BUG() if the driver eats
requests while the device is plugged.

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  parent reply	other threads:[~2000-12-27 20:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-29 11:56 plug problem in linux-2.4.0-test11 schwidefsky
2000-11-29 14:23 ` Jens Axboe
2000-11-29 17:52   ` Linus Torvalds
2000-11-29 18:11     ` Jens Axboe
2000-12-27 20:04 ` Andrea Arcangeli [this message]
2000-12-28 13:47   ` Jens Axboe

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=20001227210426.B10446@athlon.random \
    --to=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    /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