public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: IDE locking problem
Date: Sun, 3 Aug 2003 12:20:05 +0200	[thread overview]
Message-ID: <20030803102005.GR7920@suse.de> (raw)
In-Reply-To: <1059905514.3514.111.camel@gaston>

On Sun, Aug 03 2003, Benjamin Herrenschmidt wrote:
> 
> > > would help making sure we don't get a request sneaking in ?
> > 
> > Hmm not really, there's still a chance that could happen.
> 
> Not too familiar with BIO here, but we would need some kind of
> "dead" flag to cause a reject of any try to insert a new request
> in the queue, don't you think ?

That's exactly right.

> Then, IDE could do something like:
> 
>  - set dead flag
>  - wait for all pending requests to drain (easy: insert a barrier
>    in the queue and wait on it, with a hack for the barrier insertion
>    to bypass the dead flag... ugh... maybe a blk_terminate_queue()
>    doing all that would be helpful ?)
>  - unregister blkdev
>  - then tear down the queue (leaving the "empty" queue with the dead
>    flag set, not just memset(...,0,...), so that any bozo keeping a
>    reference to it will be rejected trying to insert request instead
>    of trying to tap an uninitalized queue object
> 
> What do you think ?

Sounds like just the ticket. It's basically impossible to properly
shutdown a queue without being able to quisce it like you describe. IO
events are unpredictable :)

-- 
Jens Axboe


  reply	other threads:[~2003-08-03 10:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-03  8:42 IDE locking problem Benjamin Herrenschmidt
2003-08-03  9:58 ` Benjamin Herrenschmidt
2003-08-05  0:28   ` Bartlomiej Zolnierkiewicz
2003-08-05  8:08     ` Benjamin Herrenschmidt
2003-08-05 10:49       ` Bartlomiej Zolnierkiewicz
2003-08-05 11:18         ` Benjamin Herrenschmidt
2003-08-05 12:30           ` Bartlomiej Zolnierkiewicz
2003-08-05 17:13             ` Alan Cox
2003-08-03 10:04 ` Jens Axboe
2003-08-03 10:08   ` Jens Axboe
2003-08-03 10:11   ` Benjamin Herrenschmidt
2003-08-03 10:20     ` Jens Axboe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-08-03 14:13 Manfred Spraul
2003-08-03 14:25 ` Benjamin Herrenschmidt
2003-08-03 15:35   ` Lou Langholtz
2003-08-04  5:40     ` 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=20030803102005.GR7920@suse.de \
    --to=axboe@suse.de \
    --cc=benh@kernel.crashing.org \
    --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