qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: ChenLiang <chenliang88@huawei.com>
To: "Li, Liang Z" <liang.z.li@intel.com>
Cc: "Zhang, Yang Z" <yang.z.zhang@intel.com>,
	"armbru@redhat.com" <armbru@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"lcapitulino@redhat.com" <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads
Date: Fri, 21 Nov 2014 16:38:44 +0800	[thread overview]
Message-ID: <546EFA14.7040603@huawei.com> (raw)
In-Reply-To: <546EF52A.9030103@huawei.com>

On 2014/11/21 16:17, ChenLiang wrote:

> On 2014/11/21 15:38, Li, Liang Z wrote:
> 
>>>> +int migrate_compress_threads(void)
>>>> +{
>>>> +    MigrationState *s;
>>>> +
>>>> +    s = migrate_get_current();
>>>> +
>>>> +    return s->compress_thread_count;
>>>> +}
>>>> +
>>>>  int migrate_use_xbzrle(void)
>>>>  {
>>>>      MigrationState *s;
>>>> @@ -697,4 +795,5 @@ void migrate_fd_connect(MigrationState *s)
>>>>  
>>>>      qemu_thread_create(&s->thread, "migration", migration_thread, s,
>>>>                         QEMU_THREAD_JOINABLE);
>>>> +    migrate_compress_threads_create(s);
>>
>>
>>> don't create compress_threads always.
>>> It may be better:
>>
>>> if (!migrate_use_xbzrle()) {
>>>     migrate_compress_threads_create(s);
>>> }
>>
>> Thanks for your comments, in fact,  the multiple thread compression can co-work with xbrzle, which can help to accelerate live migration.
> 
> 
> hmm, multiple thread compression can't co-work with xbzrle. xbzrle need guarantee
> the cache at src is same to dest. But I dont see that below:
> 
> +    /* XBZRLE overflow or normal page */
> +    if (bytes_sent == -1) {
> +        bytes_sent = migrate_save_block_hdr(&param->migbuf, block,
> +            offset, cont, RAM_SAVE_FLAG_COMPRESS_PAGE);
> +        blen = migrate_qemu_add_compress(&param->migbuf, p,
> +            TARGET_PAGE_SIZE, migrate_compress_level());
> +        bytes_sent += blen;
> +        atomic_inc(&acct_info.norm_pages);
> 
> the code don't update the cache of xbzrle at src.
> 
>>
>>> BTW, this patch is too big to review. Spliting it into some patch will be welcome.
>>
>> I am doing it.
>>
>>
>>
>>
>>
> 
> 
> 
> 
> 
> 

  parent reply	other threads:[~2014-11-21  8:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-06 11:08 [Qemu-devel] [PATCH v2 0/2] migration: Add a new feature to do live migration Li Liang
2014-11-06 11:08 ` [Qemu-devel] [v2 1/2] docs: Add a doc about multiple compression threads Li Liang
2014-11-06 11:25   ` Eric Blake
2014-11-06 13:24   ` Dr. David Alan Gilbert
2014-11-06 13:46     ` Eric Blake
2014-11-07  2:28     ` Li, Liang Z
2014-11-06 11:08 ` [Qemu-devel] [v2 2/2] migration: Implement " Li Liang
2014-11-06 12:57   ` Eric Blake
2014-11-21  6:18     ` Zhang, Yang Z
2014-11-24  2:25     ` Li, Liang Z
2014-11-24 17:16       ` Eric Blake
2014-12-08  6:34     ` Li, Liang Z
2014-12-10  8:23       ` Li, Liang Z
2014-11-06 15:41   ` Dr. David Alan Gilbert
2014-11-21  7:01     ` Li, Liang Z
2014-11-21  7:29   ` ChenLiang
2014-11-21  7:38     ` Li, Liang Z
2014-11-21  8:17       ` ChenLiang
2014-11-21  8:35         ` Li, Liang Z
2014-11-21  8:38         ` ChenLiang [this message]
2014-11-21  8:39         ` ChenLiang

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=546EFA14.7040603@huawei.com \
    --to=chenliang88@huawei.com \
    --cc=armbru@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=liang.z.li@intel.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yang.z.zhang@intel.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).