qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Lieven <pl@kamp.de>, 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 08:09:04 +0200	[thread overview]
Message-ID: <53706580.2050306@redhat.com> (raw)
In-Reply-To: <536E5495.6080401@kamp.de>

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?

Paolo

  parent reply	other threads:[~2014-05-12  6:09 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 [this message]
2014-05-12  8:16       ` Peter Lieven

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=53706580.2050306@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=pl@kamp.de \
    --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).