Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-08-01 Thread Ming Lei
On Sat, Aug 2, 2014 at 12:03 AM, Stefan Hajnoczi wrote: > On Fri, Aug 01, 2014 at 10:52:55PM +0800, Ming Lei wrote: >> On Fri, Aug 1, 2014 at 9:48 PM, Ming Lei wrote: >> > On Fri, Aug 1, 2014 at 9:13 PM, Stefan Hajnoczi >> > wrote: >> >> On Fri, Aug 01, 2014 at 10:54:02AM +0800, Ming Lei wrote:

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-08-01 Thread Stefan Hajnoczi
On Fri, Aug 01, 2014 at 10:52:55PM +0800, Ming Lei wrote: > On Fri, Aug 1, 2014 at 9:48 PM, Ming Lei wrote: > > On Fri, Aug 1, 2014 at 9:13 PM, Stefan Hajnoczi wrote: > >> On Fri, Aug 01, 2014 at 10:54:02AM +0800, Ming Lei wrote: > >>> On Fri, Aug 1, 2014 at 12:30 AM, Paolo Bonzini > >>> wrote:

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-08-01 Thread Ming Lei
On Fri, Aug 1, 2014 at 10:17 PM, Paolo Bonzini wrote: > Il 01/08/2014 15:48, Ming Lei ha scritto: >> On Fri, Aug 1, 2014 at 9:13 PM, Stefan Hajnoczi wrote: >>> On Fri, Aug 01, 2014 at 10:54:02AM +0800, Ming Lei wrote: On Fri, Aug 1, 2014 at 12:30 AM, Paolo Bonzini wrote: > Il 31/07/2014

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-08-01 Thread Ming Lei
On Fri, Aug 1, 2014 at 9:48 PM, Ming Lei wrote: > On Fri, Aug 1, 2014 at 9:13 PM, Stefan Hajnoczi wrote: >> On Fri, Aug 01, 2014 at 10:54:02AM +0800, Ming Lei wrote: >>> On Fri, Aug 1, 2014 at 12:30 AM, Paolo Bonzini wrote: >>> > Il 31/07/2014 18:13, Ming Lei ha scritto: >>> >> Follows 'perf rep

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-08-01 Thread Paolo Bonzini
Il 01/08/2014 15:48, Ming Lei ha scritto: > On Fri, Aug 1, 2014 at 9:13 PM, Stefan Hajnoczi wrote: >> On Fri, Aug 01, 2014 at 10:54:02AM +0800, Ming Lei wrote: >>> On Fri, Aug 1, 2014 at 12:30 AM, Paolo Bonzini wrote: Il 31/07/2014 18:13, Ming Lei ha scritto: > Follows 'perf report' resu

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-08-01 Thread Ming Lei
On Fri, Aug 1, 2014 at 9:13 PM, Stefan Hajnoczi wrote: > On Fri, Aug 01, 2014 at 10:54:02AM +0800, Ming Lei wrote: >> On Fri, Aug 1, 2014 at 12:30 AM, Paolo Bonzini wrote: >> > Il 31/07/2014 18:13, Ming Lei ha scritto: >> >> Follows 'perf report' result on cycles event for with/without bypass >>

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-08-01 Thread Ming Lei
On Thu, Jul 31, 2014 at 6:45 PM, Paolo Bonzini wrote: > Il 31/07/2014 11:47, Ming Lei ha scritto: >>> Block mirroring of a device for example is done using coroutines. >>> As block mirroring can be done on a raw device you need coroutines. >> >> If block layer knows the mirroring is in-progress, i

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-08-01 Thread Stefan Hajnoczi
On Fri, Aug 01, 2014 at 10:54:02AM +0800, Ming Lei wrote: > On Fri, Aug 1, 2014 at 12:30 AM, Paolo Bonzini wrote: > > Il 31/07/2014 18:13, Ming Lei ha scritto: > >> Follows 'perf report' result on cycles event for with/without bypass > >> coroutine: > >> > >> http://pastebin.com/ae0vnQ6V > >>

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Ming Lei
On Fri, Aug 1, 2014 at 12:30 AM, Paolo Bonzini wrote: > Il 31/07/2014 18:13, Ming Lei ha scritto: >> Follows 'perf report' result on cycles event for with/without bypass >> coroutine: >> >> http://pastebin.com/ae0vnQ6V >> >> From the profiling result, looks bdrv_co_do_preadv() is a bit slow >>

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Paolo Bonzini
Il 31/07/2014 18:13, Ming Lei ha scritto: > Follows 'perf report' result on cycles event for with/without bypass > coroutine: > > http://pastebin.com/ae0vnQ6V > > From the profiling result, looks bdrv_co_do_preadv() is a bit slow > without bypass coroutine. Yeah, I can count at least 3.3% ti

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Ming Lei
On Thu, Jul 31, 2014 at 5:15 PM, Paolo Bonzini wrote: > Il 31/07/2014 10:59, Ming Lei ha scritto: >>> > No guesses please. Actually that's also my guess, but since you are >>> > submitting the patch you must do better and show profiles where stack >>> > switching disappears after the patches. >>

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Paolo Bonzini
Il 31/07/2014 11:47, Ming Lei ha scritto: >> Block mirroring of a device for example is done using coroutines. >> As block mirroring can be done on a raw device you need coroutines. > > If block layer knows the mirroring is in-progress, it still can enable > coroutine by ignoring bypass coroutine,

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Ming Lei
On Thu, Jul 31, 2014 at 5:15 PM, Paolo Bonzini wrote: > Il 31/07/2014 10:59, Ming Lei ha scritto: >>> > No guesses please. Actually that's also my guess, but since you are >>> > submitting the patch you must do better and show profiles where stack >>> > switching disappears after the patches. >>

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Ming Lei
On Thu, Jul 31, 2014 at 3:37 PM, Benoît Canet wrote: > The Thursday 31 Jul 2014 à 11:55:28 (+0800), Ming Lei wrote : >> On Thu, Jul 31, 2014 at 7:37 AM, Paolo Bonzini wrote: >> > Il 30/07/2014 19:15, Ming Lei ha scritto: >> >> On Wed, Jul 30, 2014 at 9:45 PM, Paolo Bonzini >> >> wrote: >> >>> I

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Paolo Bonzini
Il 31/07/2014 10:59, Ming Lei ha scritto: >> > No guesses please. Actually that's also my guess, but since you are >> > submitting the patch you must do better and show profiles where stack >> > switching disappears after the patches. > Follows the below hardware events reported by 'perf stat' whe

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Ming Lei
On Thu, Jul 31, 2014 at 7:37 AM, Paolo Bonzini wrote: > Il 30/07/2014 19:15, Ming Lei ha scritto: >> On Wed, Jul 30, 2014 at 9:45 PM, Paolo Bonzini wrote: >>> Il 30/07/2014 13:39, Ming Lei ha scritto: This patch introduces several APIs for supporting bypass qemu coroutine in case of bei

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Benoît Canet
The Thursday 31 Jul 2014 à 11:55:28 (+0800), Ming Lei wrote : > On Thu, Jul 31, 2014 at 7:37 AM, Paolo Bonzini wrote: > > Il 30/07/2014 19:15, Ming Lei ha scritto: > >> On Wed, Jul 30, 2014 at 9:45 PM, Paolo Bonzini wrote: > >>> Il 30/07/2014 13:39, Ming Lei ha scritto: > This patch introduc

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-30 Thread Ming Lei
On Thu, Jul 31, 2014 at 7:37 AM, Paolo Bonzini wrote: > Il 30/07/2014 19:15, Ming Lei ha scritto: >> On Wed, Jul 30, 2014 at 9:45 PM, Paolo Bonzini wrote: >>> Il 30/07/2014 13:39, Ming Lei ha scritto: This patch introduces several APIs for supporting bypass qemu coroutine in case of bei

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 19:15, Ming Lei ha scritto: > On Wed, Jul 30, 2014 at 9:45 PM, Paolo Bonzini wrote: >> Il 30/07/2014 13:39, Ming Lei ha scritto: >>> This patch introduces several APIs for supporting bypass qemu coroutine >>> in case of being not necessary and for performance's sake. >> >> No, this i

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-30 Thread Ming Lei
On Wed, Jul 30, 2014 at 9:45 PM, Paolo Bonzini wrote: > Il 30/07/2014 13:39, Ming Lei ha scritto: >> This patch introduces several APIs for supporting bypass qemu coroutine >> in case of being not necessary and for performance's sake. > > No, this is wrong. Dataplane *must* use the same code as n

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-30 Thread Paolo Bonzini
Il 30/07/2014 13:39, Ming Lei ha scritto: > This patch introduces several APIs for supporting bypass qemu coroutine > in case of being not necessary and for performance's sake. No, this is wrong. Dataplane *must* use the same code as non-dataplane, anything else is a step backwards. If you want

[Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-30 Thread Ming Lei
This patch introduces several APIs for supporting bypass qemu coroutine in case of being not necessary and for performance's sake. Signed-off-by: Ming Lei --- include/block/coroutine.h |8 include/block/coroutine_int.h |5 + qemu-coroutine-lock.c |4 ++-- qem