All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: "Li, Liang Z" <liang.z.li@intel.com>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>,
	Markus Armbruster <armbru@redhat.com>,
	Amit Shah <amit.shah@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH V2] add migration capability to bypass the shared memory
Date: Wed, 10 Aug 2016 11:11:17 +0200	[thread overview]
Message-ID: <877fbpouoa.fsf@emacs.mitica> (raw)
In-Reply-To: <F2CBF3009FA73547804AE4C663CAB28E0421B4EB@shsmsx102.ccr.corp.intel.com> (Liang Z. Li's message of "Wed, 10 Aug 2016 05:04:31 +0000")

"Li, Liang Z" <liang.z.li@intel.com> wrote:
>> On Wed, Aug 10, 2016 at 10:22 AM, Li, Liang Z <liang.z.li@intel.com> wrote:
>> > Hi Jiangshan,
>> >
>> > Glad to see your patch. It's a simple implementation which could provide
>> very useful functions.
>> >
>> >> +static void migration_bitmap_init(unsigned long *bitmap) {
>> >> +    RAMBlock *block;
>> >> +
>> >> +    bitmap_clear(bitmap, 0, last_ram_offset() >> TARGET_PAGE_BITS);
>> >> +    rcu_read_lock();
>> >> +    QLIST_FOREACH_RCU(block, &ram_list.blocks, next) {
>> >> +        if (!migrate_bypass_shared_memory()
>> >> || !qemu_ram_is_shared(block)) {
>> >> +            bitmap_set(bitmap, block->offset >> TARGET_PAGE_BITS,
>> >
>> > You should use (block->offset >> TARGET_PAGE_BITS )/ BITS_PER_LONG
>> here.
>> 
>> Hello, Li
>> 
>> I might have missed something, could you tell me more?
>> 
>> void bitmap_set(unsigned long *map, long start, long nr); I think the @start
>> and @nr are both the number of the bits.
>> 
>> thanks,
>> Lai
>
> You are right,  I have make a mistake by checking the code. Sorry for the noise.
>
> BTW. Is it possible to bypass the shared block in the 'ram_find_and_save_block'?
> I mean no to check if a page is dirty for a shared block, it may make things faster.

Nice spotted.  That would make things faster.  But once there we could
split the bitmap by ramblock, and the migration_dirty_pages also per
block, that would make all the searchs faster, and adding/removing
blocks of ram much easier.  If we enter optimizing that function, we
could really do much better that the "again" parameter that we have
right now.

Later, Juan.

  reply	other threads:[~2016-08-10  9:11 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09 12:10 [Qemu-devel] [PATCH] add migration capability to bypass the shared memory Lai Jiangshan
2016-08-09 13:51 ` no-reply
2016-08-09 19:12 ` Dr. David Alan Gilbert
2016-08-10  0:54   ` [Qemu-devel] [PATCH V2] " Lai Jiangshan
2016-08-10  1:22     ` Fam Zheng
2016-08-10  2:22     ` Li, Liang Z
2016-08-10  3:22       ` Lai Jiangshan
2016-08-10  5:04         ` Li, Liang Z
2016-08-10  9:11           ` Juan Quintela [this message]
2016-08-11  7:11             ` Li, Liang Z
2016-08-11 14:31               ` Lai Jiangshan
2016-08-11 14:45                 ` Lai Jiangshan
2017-09-21  3:41                   ` Zhang Haoyu
2016-08-12  6:48                 ` Li, Liang Z
2016-08-12  7:19                   ` Lai Jiangshan
2017-09-25  7:42     ` Zhang Haoyu
2017-09-25 12:13     ` Zhang Haoyu
2016-08-10  1:09   ` [Qemu-devel] [PATCH] " Lai Jiangshan
2016-08-10  9:03 ` Juan Quintela
2016-08-30  4:11   ` Lai Jiangshan
2016-11-18 13:01     ` Alexander Graf
2017-01-12 19:19     ` Jianjun Duan
2017-01-13  4:44       ` Lai Jiangshan
2017-01-16 17:38         ` Jianjun Duan
2017-09-21  6:33     ` Zhang Haoyu

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=877fbpouoa.fsf@emacs.mitica \
    --to=quintela@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=armbru@redhat.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=liang.z.li@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.