From: Jeff Garzik <jgarzik@pobox.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: linux-ide@vger.kernel.org, Matthew Wilcox <willy@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] AHCI: Remove an unnecessary flush from ahci_qc_issue
Date: Sun, 06 Jul 2008 09:44:54 -0400 [thread overview]
Message-ID: <4870CC56.7060002@pobox.com> (raw)
In-Reply-To: <1215350600-5179-1-git-send-email-matthew@wil.cx>
Matthew Wilcox wrote:
> In an I/O heavy workload (IOZone), ahci_qc_issue is the second-highest
> consumer of CPU cycles. Removing the flush gets us approximately 10%
> bandwidth improvement. I believe this to be because the CPU can start
> queueing the next request instead of waiting for the readl() to flush the
> writes to the device. The flush isn't necessary because we're using a
> 'queue' metaphor; we don't guarantee the command has got to the device,
> nor do we need to guarantee the command has got to the controller.
>
> Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
> ---
> drivers/ata/ahci.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index 6a7a70a..58915bd 100644
> --- a/drivers/ata/ahci.c
> +++ b/drivers/ata/ahci.c
> @@ -1846,7 +1846,6 @@ static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc)
> if (qc->tf.protocol == ATA_PROT_NCQ)
> writel(1 << qc->tag, port_mmio + PORT_SCR_ACT);
> writel(1 << qc->tag, port_mmio + PORT_CMD_ISSUE);
> - readl(port_mmio + PORT_CMD_ISSUE); /* flush */
>
(LKML CC added for wider review)
As I noted in IRC, I've queued this and am planning to apply this, as
I've been thinking along the same lines for quite a while now... not
just in this driver but other drivers too.
A couple places in libata arguably need additional flushing, but some
places could actually stand to use /less/
next prev parent reply other threads:[~2008-07-06 13:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-06 13:23 [PATCH] AHCI: Remove an unnecessary flush from ahci_qc_issue Matthew Wilcox
2008-07-06 13:44 ` Jeff Garzik [this message]
2008-07-11 13:49 ` 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=4870CC56.7060002@pobox.com \
--to=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=willy@linux.intel.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;
as well as URLs for NNTP newsgroup(s).