xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Keir Fraser <keir@xen.org>, Jan Beulich <jbeulich@suse.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH 3 of 5] rombios/ata: Reading this status register has no relevant side effects
Date: Mon, 30 Jul 2012 22:57:31 +0100	[thread overview]
Message-ID: <20120730225731.70f6842a@ultron> (raw)
In-Reply-To: <5e8fbfea222946369f08.1343677642@andrewcoop.uk.xensource.com>

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.

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.

Alan

  reply	other threads:[~2012-07-30 21:57 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 [this message]
2012-07-31 10:08     ` David Vrabel
2012-07-31 10:28     ` Andrew Cooper
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=20120730225731.70f6842a@ultron \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=andrew.cooper3@citrix.com \
    --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).