From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "Keir (Xen.org)" <keir@xen.org>, Jan Beulich <jbeulich@suse.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH 3 of 5] rombios/ata: Reading this status register has no relevant side effects
Date: Tue, 31 Jul 2012 11:28:44 +0100 [thread overview]
Message-ID: <5017B35C.1070009@citrix.com> (raw)
In-Reply-To: <20120730225731.70f6842a@ultron>
On 30/07/12 22:57, Alan Cox wrote:
> On Mon, 30 Jul 2012 20:47:22 +0100
> Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>
>> So taking two traps when one will do is pointless. This codepath is on the int
>> 0x13 hot path, and removing it has about a 30% reduction in the number of traps
>> to Qemu during Win7 boot.
> You can't read the status for 400nS after a command issue, so throwing
> one away is a typical way to handle that.
On real hardware, but virtual hardware has no such restriction. This
version of rombios is never going to be running on real hardware.
>
> All of this is optimising the wrong thing.
>
> The problem is that neither kvm not xen have the most basic prediction
> handlers in the kernel side exception code so keep hitting qemu.
>
> For a 99% of the ATA transfers you can predict the next few in and outs
> and pre-load them into your trap handler avoiding bouncing into qemu, on
> a miss you go back into qemu and load the next prediction block (or tree
> even)
>
> That's the kind of optimisation that will really make it fly.
Quite likely, but that is a substantial architectural change, whereas
these patches are the result of a few hours of work and many hours of
testing.
>
> Alan
>
--
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com
next prev parent reply other threads:[~2012-07-31 10:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-30 19:47 [PATCH 0 of 5] Rombios PIO performance Andrew Cooper
2012-07-30 19:47 ` [PATCH 1 of 5] rombios/keyboard: Don't needlessly poll the status register Andrew Cooper
2012-07-30 19:47 ` [PATCH 2 of 5] rombios/ata: Do not wait for BSY to be set Andrew Cooper
2012-07-30 20:18 ` Pasi Kärkkäinen
2012-07-31 9:37 ` [PATCH 2 of 5] (V2) " Andrew Cooper
2012-07-30 19:47 ` [PATCH 3 of 5] rombios/ata: Reading this status register has no relevant side effects Andrew Cooper
2012-07-30 21:57 ` Alan Cox
2012-07-31 10:08 ` David Vrabel
2012-07-31 10:28 ` Andrew Cooper [this message]
2012-07-30 19:47 ` [PATCH 4 of 5] rombios/ata Remove more needless traps from the int 0x13 path Andrew Cooper
2012-07-30 19:47 ` [PATCH 5 of 5] rombios/debug: Reduce verbosity of rombios Andrew Cooper
-- strict thread matches above, loose matches on Subject: below --
2012-11-26 16:41 [PATCH 0 of 5] HVM performance improvements Andrew Cooper
2012-11-26 16:41 ` [PATCH 3 of 5] rombios/ata: Reading this status register has no relevant side effects Andrew Cooper
2012-11-26 16:51 ` Ian Campbell
2012-11-26 16:56 ` Andrew Cooper
2012-11-26 17:01 ` Ian Campbell
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=5017B35C.1070009@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xen.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;
as well as URLs for NNTP newsgroup(s).