From: Tejun Heo <htejun@gmail.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: axboe@suse.de, jgarzik@pobox.com, James.Bottomley@steeleye.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH linux-2.6-block:post-2.6.15 09/10] blk: add FUA support to IDE
Date: Thu, 24 Nov 2005 21:21:27 +0900 [thread overview]
Message-ID: <4385B047.8020707@gmail.com> (raw)
In-Reply-To: <4385AAFB.5070605@gmail.com>
Oops, I was delusional again.
Tejun Heo wrote:
>
> Well, this one is quite a pain in the ass.
>
> I'm not very fond of ->rq_select_barrier() approach for the following
> reasons.
>
> * That removes possibility of correct synchronization. With
> blk_queue_ordered() approach, we can later add
> blk_queue_[un]lock_ordered() to achieve correct synchronization if that
> becomes necessary, but with ->rq_select_barrier() approach, the
> low-level driver ends up having less control over what's gonna happen when.
Of course, we can do the same lock/unlock dance with
->rq_select_barrier() approach. I wasn't thinking straight. Forget
this rationale.
>
> * Changing ordered mode is not supposed to be a frequent operation and
> the blk_queue_ordered() interface makes that explicit.
>
> So, I added ide_driver_t->protocol_changed() callback which gets called
> whenever dma/multimode changes occur. Unfortunately, dma/multmode
> changes can be committed with or without context, and with or without
> queue lock. As blk_queue_ordered uses the queue lock for
> synchronization, this becomes issue.
>
> I tried to distinguish places where the changes occur while queue lock
> is held from the other. Not only was it highly error-prone, it couldn't
> be done without modifying/auditing all low-level drivers as some drivers
> (cs5520) use the same function which touches dma setting
> (cs5520_tune_chipset) from both ->speedproc (called with queuelock) and
> ->ide_dma_check (called without queuelock).
>
> One alternative I'm thinking of is using a workqueue to call
> blk_queue_ordered, such that we don't have to guess whether or not we're
> called with queuelock held. Unfortunately, this will give us a small
> window where wrong barrier requests can hit the drive.
One thing I wanna add here is that using ->rq_select_barrier() would
have similar race window. The race windows is just hidden there in the
request queue.
>
> Bartlomiej, any ideas?
>
> Jens, as this one seems to need some time to settle, I'm gonna post
> updated patchset for post-2.6.15 without ide-fua patch, so that the
> other stuff can be pushed into -mm. I think we can live without ide-fua
> for a while. :-)
>
> Thanks.
>
--
tejun
next prev parent reply other threads:[~2005-11-24 12:21 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-17 15:36 [PATCH linux-2.6-block:post-2.6.15 00/10] blk: reimplementation of I/O barrier Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 01/10] blk: add @uptodate to end_that_request_last() and @error to rq_end_io_fn() Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 02/10] blk: separate out bio init part from __make_request Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 03/10] blk: reimplement handling of barrier request Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 04/10] blk: update SCSI to use new blk_ordered Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 05/10] blk: add FUA support to SCSI disk Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 06/10] blk: update libata to use new blk_ordered Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 07/10] blk: add FUA support to libata Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 08/10] blk: update IDE to use new blk_ordered Tejun Heo
2005-11-17 20:11 ` Bartlomiej Zolnierkiewicz
2005-11-18 15:07 ` Tejun Heo
2005-11-18 15:59 ` Bartlomiej Zolnierkiewicz
2005-11-22 2:44 ` Tejun Heo
2005-11-22 8:36 ` Bartlomiej Zolnierkiewicz
2005-11-22 8:39 ` Bartlomiej Zolnierkiewicz
2005-11-23 7:23 ` Tejun Heo
2005-11-23 8:40 ` Bartlomiej Zolnierkiewicz
2005-11-23 8:46 ` Jens Axboe
2005-11-23 9:00 ` Tejun
2005-11-23 9:05 ` Bartlomiej Zolnierkiewicz
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 09/10] blk: add FUA support to IDE Tejun Heo
2005-11-17 20:39 ` Bartlomiej Zolnierkiewicz
2005-11-18 15:25 ` Tejun Heo
2005-11-18 16:17 ` Bartlomiej Zolnierkiewicz
2005-11-18 17:02 ` Alan Cox
2005-11-18 16:38 ` Bartlomiej Zolnierkiewicz
2005-11-18 17:41 ` Alan Cox
2005-11-24 11:58 ` Tejun Heo
2005-11-24 12:21 ` Tejun Heo [this message]
2005-11-24 14:21 ` Bartlomiej Zolnierkiewicz
2005-11-17 15:37 ` [PATCH linux-2.6-block:post-2.6.15 10/10] blk: I/O barrier documentation Tejun Heo
2005-11-17 16:20 ` [PATCH linux-2.6-block:post-2.6.15 00/10] blk: reimplementation of I/O barrier Jeff Garzik
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=4385B047.8020707@gmail.com \
--to=htejun@gmail.com \
--cc=James.Bottomley@steeleye.com \
--cc=axboe@suse.de \
--cc=bzolnier@gmail.com \
--cc=jgarzik@pobox.com \
--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