From: Peter Lieven <pl@kamp.de>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: dgilbert@redhat.com, quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH] migration: cache memory region ram ptr
Date: Mon, 12 May 2014 10:16:21 +0200 [thread overview]
Message-ID: <53708355.2080604@kamp.de> (raw)
In-Reply-To: <53706580.2050306@redhat.com>
Am 12.05.2014 08:09, schrieb Paolo Bonzini:
> Il 10/05/2014 18:32, Peter Lieven ha scritto:
>> What about XEN?
>>
>
> You're right, Xen wouldn't work. Your original patch would not break it just because Xen doesn't use migration (but the code would be broken).
>
> You would have to cache qemu_get_ram_block rather than qemu_get_ram_ptr, move RAMBlock to memory-internal.h, and split the RAMBlock + ram_addr_t => void * conversion out of qemu_get_ram_ptr and into a separate function (to be used by memory_region_get_ram_ptr).
>
> I'm not sure of the benefit of your patch though. qemu_get_ram_block already has a 1-item cache, are you seeing a low hit rate there? Or any other profiling that shows qemu_get_ram_ptr as hot?
qemu_get_ram_ptr is hot only during migration. But the hit-rate of the LRU cache seems to be good. I am wondering if this is different if the migration
has difficulties to converge, but you might be right it should be neglectible.
I ran some basic migration tests with and without the patch. It might be that the results with the cache are slightly better, but the variance of the
results is high. I had to run a significant number of tests to get more evidence.
Peter
>
> Paolo
prev parent reply other threads:[~2014-05-12 8:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-10 10:51 [Qemu-devel] [PATCH] migration: cache memory region ram ptr Peter Lieven
2014-05-10 11:38 ` 陈梁
2014-05-10 13:13 ` Peter Lieven
2014-05-10 15:33 ` Paolo Bonzini
2014-05-10 16:07 ` Peter Lieven
2014-05-10 16:32 ` Peter Lieven
2014-05-10 16:44 ` Peter Lieven
2014-05-12 6:09 ` Paolo Bonzini
2014-05-12 8:16 ` Peter Lieven [this message]
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=53708355.2080604@kamp.de \
--to=pl@kamp.de \
--cc=dgilbert@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.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).