qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Avi Kivity <avi@redhat.com>
Cc: Blue Swirl <blauwirbel@gmail.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] memory: Reintroduce dirty flag to optimize changes on disabled regions
Date: Mon, 05 Nov 2012 07:26:47 +0100	[thread overview]
Message-ID: <50975C27.5010906@web.de> (raw)
In-Reply-To: <5096C044.7060504@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1831 bytes --]

On 2012-11-04 20:21, Avi Kivity wrote:
> On 11/04/2012 10:30 AM, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Cirrus is triggering this, e.g. during Win2k boot: Changes only on
>> disabled regions require no topology update when transaction depth drops
>> to 0 again.
> 
> 817dcc5368988b0 (pci: give each device its own address space) mad this
> much worse by multiplying the number of address spaces.  Each change is
> now evaluated N+2 times, where N is the number of PCI devices.  It also
> causes a corresponding expansion in memory usage.

I know... But this regression predates your changes, is already visible
right after 02e2b95fb4.

> 
> I want to address this by caching AddressSpaceDispatch trees with the
> key being the contents of the FlatView for that address space.  This
> will drop the number of distinct trees to 2-4 (3 if some devices have
> PCI_COMMAND_MASTER disabled, 4 if the PCI address space is different
> from the cpu memory address space) but will fail if we make each address
> space different (for example filtering out the device's own BARs).
> 
> If this change also improves cpu usage sufficiently, then it will be
> better than your patch, which doesn't recognize changes in an enabled
> region inside a disabled or hidden region.

True, though the question is how common such scenarios are. This one
(cirrus with win2k) is already special.

>  In other words, your patch
> fits the problem at hand but isn't general.  On the other hand my
> approach doesn't eliminate render_memory_region(), just the exec.c stuff
> and listener updates.  So we need to understand where the slowness comes
> from.

I would just like to have some even intermediate solution for 1.3. We
can still make it more perfect later on if required.

Jan



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

  reply	other threads:[~2012-11-05  6:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-04  8:30 [Qemu-devel] [PATCH] memory: Reintroduce dirty flag to optimize changes on disabled regions Jan Kiszka
2012-11-04 19:21 ` Avi Kivity
2012-11-05  6:26   ` Jan Kiszka [this message]
2012-11-05  8:12     ` Avi Kivity
2012-11-05  8:51       ` Jan Kiszka
2012-11-05 12:33         ` Avi Kivity
2012-11-05 12:37           ` Jan Kiszka
2012-11-25 10:18             ` Avi Kivity
2012-11-25 10:45               ` Jan Kiszka
2012-11-25 12:47                 ` Avi Kivity
2012-11-05 15:45 ` [Qemu-devel] [PATCH v2] " Jan Kiszka
2012-11-10 19:28   ` Blue Swirl

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=50975C27.5010906@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.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).