Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-12-10 Thread Li, Liang Z
>>> ## >>> { 'enum': 'MigrationCapability', >>> - 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks'] >>> } >>> + 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', >>>+ 'compress'] } >>> >> >>I'll repeat what I said on v1 (but this time, with some links to back

Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-12-07 Thread Li, Liang Z
>> # >> # Since: 1.2 >> ## >> { 'enum': 'MigrationCapability', >> - 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks'] >> } >> + 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', >>+ 'compress'] } >> > >I'll repeat what I said on v1 (but this time, with som

Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-11-24 Thread Eric Blake
On 11/23/2014 07:25 PM, Li, Liang Z wrote: >>> # @auto-converge: If enabled, QEMU will automatically throttle down the >>> guest >>> # to speed up convergence of RAM migration. (since 1.6) >>> # >>> # Since: 1.2 >>> ## >>> { 'enum': 'MigrationCapability', >>> - 'data': ['xbzrle', '

Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-11-23 Thread Li, Liang Z
> > # @auto-converge: If enabled, QEMU will automatically throttle down the > > guest > > # to speed up convergence of RAM migration. (since 1.6) > > # > > # Since: 1.2 > > ## > > { 'enum': 'MigrationCapability', > > - 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-block

Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-11-21 Thread ChenLiang
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

Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-11-21 Thread ChenLiang
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

Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-11-21 Thread Li, Liang Z
> 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(¶m->migbuf, block, > +

Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-11-21 Thread ChenLiang
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

Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-11-20 Thread Li, Liang Z
> > +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(Migr

Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-11-20 Thread ChenLiang
On 2014/11/6 19:08, Li Liang wrote: > Instead of sending the guest memory directly, this solution compress > the ram page before sending, after receiving, the data will be > decompressed. > This feature can help to reduce the data transferred about > 60%, this is very useful when the network bandw

Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-11-20 Thread Li, Liang Z
> > +static void migrate_put_be32(MigBuf *f, unsigned int v) > > +{ > > +migrate_put_byte(f, v >> 24); > > +migrate_put_byte(f, v >> 16); > > +migrate_put_byte(f, v >> 8); > > +migrate_put_byte(f, v); > > +} > > + > > +static void migrate_put_be64(MigBuf *f, uint64_t v) > > +{ > > +

Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-11-20 Thread Zhang, Yang Z
Eric Blake wrote on 2014-11-06: Hi Eric Thanks for your review and comment. > On 11/06/2014 12:08 PM, Li Liang wrote: >> Instead of sending the guest memory directly, this solution compress >> the ram page before sending, after receiving, the data will be >> decompressed. >> This feature can h

Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-11-06 Thread Dr. David Alan Gilbert
* Li Liang (liang.z...@intel.com) wrote: > Instead of sending the guest memory directly, this solution compress > the ram page before sending, after receiving, the data will be > decompressed. > This feature can help to reduce the data transferred about > 60%, this is very useful when the network b

Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-11-06 Thread Eric Blake
On 11/06/2014 12:08 PM, Li Liang wrote: > Instead of sending the guest memory directly, this solution compress > the ram page before sending, after receiving, the data will be > decompressed. > This feature can help to reduce the data transferred about > 60%, this is very useful when the network ba

[Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-11-06 Thread Li Liang
Instead of sending the guest memory directly, this solution compress the ram page before sending, after receiving, the data will be decompressed. This feature can help to reduce the data transferred about 60%, this is very useful when the network bandwidth is limited, and the migration time can als