Re: [Qemu-devel] [PATCH RESEND for 2.3 0/6] xbzrle: optimize the xbzrle

2014-12-22 Thread ChenLiang
On 2014/12/16 23:01, Dr. David Alan Gilbert wrote: > * Amit Shah (amit.s...@redhat.com) wrote: >> On (Wed) 10 Dec 2014 [08:03:33], Amit Shah wrote: >>> On (Mon) 24 Nov 2014 [19:55:46], arei.gong...@huawei.com wrote: >>>> From: ChenLiang >>>> >&g

Re: [Qemu-devel] [PATCH RESEND for 2.3 5/6] migration: optimize xbzrle by reducing data copy

2014-12-10 Thread ChenLiang
On 2014/12/10 18:39, Dr. David Alan Gilbert wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> wrote: >>> From: ChenLiang >>> >>> Signed-off-by: ChenLiang >>> Signed-off-by: Gonglei >>> Reviewed-by: Dr. David Alan Gilbert >&g

Re: [Qemu-devel] [PATCH RESEND for 2.3 0/6] xbzrle: optimize the xbzrle

2014-12-10 Thread ChenLiang
On 2014/12/10 18:09, Amit Shah wrote: > On (Wed) 10 Dec 2014 [08:03:33], Amit Shah wrote: >> On (Mon) 24 Nov 2014 [19:55:46], arei.gong...@huawei.com wrote: >>> From: ChenLiang >>> >>> Hi, >>> >>> This set of patches rebase on >>> ht

Re: [Qemu-devel] [PATCH RESEND for 2.3 4/6] xbzrle: check 8 bytes at a time after an concurrency scene

2014-12-09 Thread ChenLiang
On 2014/12/10 11:18, Amit Shah wrote: > On (Mon) 24 Nov 2014 [19:55:50], arei.gong...@huawei.com wrote: >> From: ChenLiang >> >> The logic of old code is correct. But Checking byte by byte will >> consume time after an concurrency scene. >> >> Signed-off-b

Re: [Qemu-devel] [PATCH v2] Block migration: fix return value

2014-11-25 Thread ChenLiang
l(f) - last_ftell; > +if (delta_ftell > 0) { > +return 1; > +} else if (delta_ftell < 0) { > +return -1; > +} else { > +return 0; > +} > } > > /* Called with iothread lock taken. */ Reviewed-by: ChenLiang

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(); >>

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(); >>

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 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] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
On 2014/10/14 20:27, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 08:15:10PM +0800, ChenLiang wrote: >> On 2014/10/14 19:48, Michael S. Tsirkin wrote: >> >>> On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: >>>> We find overlap when the siz

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
On 2014/10/14 20:28, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 08:19:56PM +0800, ChenLiang wrote: >> On 2014/10/14 19:58, Michael S. Tsirkin wrote: >> >>> On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: >>>> We find overlap when the siz

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
On 2014/10/14 19:58, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: >> We find overlap when the size of pci bar is bigger then 16MB, it overlaps >> with private >> memslot in the kmod. By the way, the new kmod skip private memslot. B

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
On 2014/10/14 19:58, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: >> We find overlap when the size of pci bar is bigger then 16MB, it overlaps >> with private >> memslot in the kmod. By the way, the new kmod skip private memslot. B

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
On 2014/10/14 19:48, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 07:41:14PM +0800, ChenLiang wrote: >> We find overlap when the size of pci bar is bigger then 16MB, it overlaps >> with private >> memslot in the kmod. By the way, the new kmod skip private memslot. B

Re: [Qemu-devel] [PATCH] pci: do not pci_update_mappings when guest gets bar size

2014-10-14 Thread ChenLiang
0/14 19:20, Michael S. Tsirkin wrote: > On Tue, Oct 14, 2014 at 07:04:14PM +0800, arei.gong...@huawei.com wrote: >> From: ChenLiang >> >> Power-up software can determine how much address space the device >> requires by writing a value of all 1's to the reg

[Qemu-devel] 答复: [PATCH v2 06/43] Return path: socket_writev_buffer: Block even on non-blocking fd's

2014-08-11 Thread chenliang (T)
From: "Dr. David Alan Gilbert" The return path uses a non-blocking fd so as not to block waiting for the (possibly broken) destination to finish returning a message, however we still want outbound data to behave in the same way and block. Signed-off-by: Dr. David Alan Gilbert Hi David It

Re: [Qemu-devel] [PULL 17/19] target-i386: Support "invariant tsc" flag

2014-08-08 Thread chenliang (T)
Hi, We found that value of host cpus tsc are same to echo other when host has invariant tsc flag. But it is not in vm. The problem is that offset of vcpus tsc are not equal. The offset is set when vcpu is created. Is it ok to set same offset? And is it reasonable? Best regards Chen Liang From:

Re: [Qemu-devel] [RFC PATCH 1/5] bootindex: add *_boot_device_path function

2014-07-08 Thread ChenLiang
On 2014/7/8 16:33, Amos Kong wrote: > On Mon, Jul 07, 2014 at 05:10:57PM +0800, arei.gong...@huawei.com wrote: >> From: Chenliang >> >> Add del_boot_device_path and modify_boot_device_path. Device should >> be removed from boot device list by del_boot_device_

Re: [Qemu-devel] [PATCH] ide: fix double free

2014-07-07 Thread ChenLiang
On 2014/7/3 18:41, Paolo Bonzini wrote: > Il 03/07/2014 04:23, ChenLiang ha scritto: >> Program received signal SIGABRT, Aborted. >> 0x7fd548355b55 in raise () from /lib64/libc.so.6 >> (gdb) bt >> #0 0x7fd548355b55 in raise () from /lib64/libc.so.6 >>

Re: [Qemu-devel] [PATCH] ide: fix double free

2014-07-02 Thread ChenLiang
On 2014/7/2 20:19, Paolo Bonzini wrote: > Il 02/07/2014 13:57, ChenLiang ha scritto: >>>> Hmm, dbs->in_cancel will be true always. Although this will avoid freeing >>>> dbs by dma_comlete. >>>> But it maybe a mistake. >>> >>> This was o

Re: [Qemu-devel] [PATCH] ide: fix double free

2014-07-02 Thread ChenLiang
On 2014/7/2 19:40, Paolo Bonzini wrote: > Il 02/07/2014 13:33, ChenLiang ha scritto: >> On 2014/7/2 18:16, Paolo Bonzini wrote: >> >>> Il 02/07/2014 11:46, Gonglei (Arei) ha scritto: >>>> Hi, Paolo. We have tested your above patch, and it works well for us.

Re: [Qemu-devel] [PATCH] ide: fix double free

2014-07-02 Thread ChenLiang
On 2014/7/2 18:16, Paolo Bonzini wrote: > Il 02/07/2014 11:46, Gonglei (Arei) ha scritto: >> Hi, Paolo. We have tested your above patch, and it works well for us. > > I'm still not sure where the fix is. I jotted the patch quickly, but I'd > rather understand it better before submitting it. He

Re: [Qemu-devel] [PATCH] ide: fix double free

2014-07-02 Thread ChenLiang
; > } > > /* after the patch dbs->in_cancel is true, the if never triggers */ > if (!dbs->in_cancel) { > /* Requests may complete while dma_aio_cancel is in progress. > * this case, the AIOCB should not be released because it is > * still referenced by dma_aio_cancel. */ > qemu_aio_release(dbs); > } > > /* back to dma_aio_cancel */ > qemu_aio_release(dbs); > > This doesn't make sense to me. Can you find out where I'm wrong? > > Paolo > > . > This patch avoid freeing dbs by dma_complete when dma_aio_cancel is running. Because dma_complete also will be called by dma_bdrv_cb. So double free will never happen. Chenliang

Re: [Qemu-devel] [PATCH] ide: fix double free

2014-07-02 Thread ChenLiang
dbs->common.cb = NULL; > dma_complete(dbs, 0); > +qemu_aio_release(dbs); > } > > static const AIOCBInfo dma_aiocb_info = { > > > . > acked, thanks Best regards Chenliang

Re: [Qemu-devel] The master branch qemu compiles failed.

2014-07-01 Thread ChenLiang
On 2014/7/1 16:17, Paolo Bonzini wrote: > Il 01/07/2014 10:00, ChenLiang ha scritto: >> ./configure --enable-debug --target-list=x86_64-softmmu >> make -j >> >> net/l2tpv3.c: In function ‘net_l2tpv3_process_queue’: >> net/l2tpv3.c:368: error: invalid use of undef

[Qemu-devel] The master branch qemu compiles failed.

2014-07-01 Thread ChenLiang
regards Chenliang

Re: [Qemu-devel] 答复: [question] Is it, valuable to achieve modify boot index when vm is running?

2014-06-25 Thread ChenLiang
> > 发件人: qemu-devel-bounces+yukewei=kingsoft@nongnu.org > [qemu-devel-bounces+yukewei=kingsoft@nongnu.org] 代表 ChenLiang > [chenlian...@huawei.com] > 发送时间: 2014年6月25日 18:28 > 收件人: qemu-devel@nongnu.org > 抄送: Paolo Bonz

Re: [Qemu-devel] Clock Emulation

2014-06-25 Thread ChenLiang
On 2014/6/24 16:11, Ayaz Akram wrote: > Can anyone help me out in finding how does QEMU provide emulated clock to > guest operating system.. For instance, how does it increment x86's time > stamp counter register?? The tsc of vcpu is increased by hardware.

[Qemu-devel] [question] Is it, valuable to achieve modify boot index when vm is running?

2014-06-25 Thread ChenLiang
hi,all Qemu can not modify boot index when vm is running. It is inconvenience when we install guest os. Is it necessary to achieve modify boot index online? We can add one qmp interface to achieve it.

Re: [Qemu-devel] [PATCH-trivial] arch_init.c: Always be sure that 'encoded_buf' and 'current_buf' are lock protected

2014-06-03 Thread ChenLiang
+797,10 @@ static int ram_save_setup(QEMUFile *f, void *opaque) > error_report("Error allocating current_buf"); > g_free(XBZRLE.encoded_buf); > XBZRLE.encoded_buf = NULL; > +XBZRLE_cache_unlock(); > return -1; > } > +XBZRLE_cache_unlock(); > > acct_clear(); > } It isn't necessary. Best regards. ChenLiang

Re: [Qemu-devel] [PATCH-trivial] arch_init.c: Free 'cache' in cache_fini() to avoid memory leak

2014-06-03 Thread ChenLiang
cache->page_cache = NULL; > + g_free(cache); > } > > static size_t cache_get_cache_pos(const PageCache *cache, Reviewed-by: ChenLiang

Re: [Qemu-devel] [PATCH 0/6] Obtain dirty bitmap via VM logging

2014-05-22 Thread ChenLiang
On 2014/5/22 19:21, Sanidhya Kashyap wrote: > On Wed, May 21, 2014 at 12:15 PM, ChenLiang wrote: >> On 2014/5/21 12:56, Sanidhya Kashyap wrote: >> >>> On Wed, May 21, 2014 at 9:43 AM, ChenLiang wrote: >>>> Hi, >>>> Nice j

Re: [Qemu-devel] [PATCH 0/6] Obtain dirty bitmap via VM logging

2014-05-20 Thread ChenLiang
On 2014/5/21 12:56, Sanidhya Kashyap wrote: > On Wed, May 21, 2014 at 9:43 AM, ChenLiang wrote: >> Hi, >> Nice job. We should avoid running migration_thread and bitmap_logging_thread >> simultaneously. >> > Any particular suggestion to avoid running simultane

Re: [Qemu-devel] [PATCH 0/6] Obtain dirty bitmap via VM logging

2014-05-20 Thread ChenLiang
Hi, Nice job. We should avoid running migration_thread and bitmap_logging_thread simultaneously. Best regards: ChenLiang > Hi, > > This is the first part of my gsoc work. > > Following patches add the support of dirty bitmap logging and dumping > to a specified file. These p

Re: [Qemu-devel] Question about RAM migration flags

2014-05-08 Thread ChenLiang
On 2014/5/9 7:08, Peter Lieven wrote: > Hi, > > while working on ram migration and reading through the code I realized that > qemu does not stop loading a saved VM or rejecting an incoming migration > if there is a flag in the stream that it does not understand. An unknown flag > is simply ignore

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-08 Thread ChenLiang
On 2014/5/8 22:34, Paolo Bonzini wrote: > Il 08/05/2014 16:31, Chris Friesen ha scritto: >> >> >> The fact remains that qemu crashes when I apply the patch. I also tried >> patching it as below in virtio_pci_vmstate_change(). That would allow >> the VM to boot, but it would crash when I tried to