From: Jens Axboe <jens.axboe@oracle.com>
To: Ed Cashin <ecashin@coraid.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] aoe: add barrier support
Date: Sat, 10 Oct 2009 12:38:02 +0200 [thread overview]
Message-ID: <20091010103801.GP9228@kernel.dk> (raw)
In-Reply-To: <4172194fb69fa7475c78e20ddce579fa@coraid.com>
On Fri, Oct 09 2009, Ed Cashin wrote:
> This patch allows the aoe driver to support barrier bios by draining
> the current set of outstanding AoE commands and then issuing an ATA
> flush command. If the barrier contains I/O, that I/O is then
> performed, followed by a final ATA flush command.
Good, that's exactly how libata/ide works as well.
> This aoe driver differs from most block device drivers in that it does
> not handle I/O requests but handles bios, providing a make_request_fn
> to the block layer.
>
> The implementation makes the make_request_fn sleep to wait for any
> in-progress barrier to finish, and it sleeps waiting for the ATA flush
> to complete. I expect the process using make_request_fn to be
> something like "cp", in which case sleeping will not interfere with
> the performance characteristics of any unrelated aoe devices in the
> system. That hasn't been tested yet, though, and I'm concerned that
> putting pdflush to sleep could interfere with dirty data flushing on
> other aoe devices. Any comments about this issue would be
> appreciated.
pdflush doesn't exist anymore, the per-bdi thread may block without
causing any problems.
> Some debugging code remains in this patch for testing purposes, marked
> with "XXXdebug". This code allows barrier handling to be turned off
> and on and to be traced. Turning barrier support on and off is only
> supported on module load. This testing feature will not be a part of
> the final barrier support for aoe.
Sounds good.
> Jens Axboe suggests that code that we know can sleep should use
> spin_lock_irq instead of spin_lock_irqsave. Even though the latter is
> harmless, it also adds no value. This patch sneaks a few such lock
> changes in. Please comment if you think the change from
> spin_lock_irqsave to spin_lock_irq should be split out of the final
> version of this patch.
While I (obviously) think that is a good idea, you should not include it
in this patch. Patches should generally only do just one thing.
--
Jens Axboe
next parent reply other threads:[~2009-10-10 10:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4172194fb69fa7475c78e20ddce579fa@coraid.com>
2009-10-10 10:38 ` Jens Axboe [this message]
2009-10-09 14:30 [RFC] aoe: add barrier support Ed Cashin
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=20091010103801.GP9228@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=ecashin@coraid.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.