[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode
From: |
Ming Lei |
Subject: |
Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode |
Date: |
Fri, 1 Aug 2014 10:54:02 +0800 |
On Fri, Aug 1, 2014 at 12:30 AM, Paolo Bonzini <address@hidden> 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
>> without bypass coroutine.
>
> Yeah, I can count at least 3.3% time spent here:
>
> 0.87% bdrv_co_do_preadv
> 0.79% bdrv_aligned_preadv
> 0.71% qemu_coroutine_switch
> 0.52% tracked_request_begin
> 0.45% coroutine_swap
>
> Another ~3% wasted in malloc, etc.
That should be related with coroutine and the BH in bdrv_co_do_rw().
In this post I didn't apply Stephan's coroutine resize patch which might
decrease usage of malloc() for coroutine.
At least, coroutine isn't cheap from the profile result.
>
> I suggest that we discuss it on the phone at next Tuesday's KVM call.
No problem, and we can continue to discuss it on mail list too. If you
and someone else need more profiling data, please feel free to let me
know, and I am happy to provide that.
> I'm not denying that bypassing coroutines is a useful thing to do. But
> *everyone* should be doing that if it is so useful, and it's hard to do
> it without causing code duplication.
Yes, I agree, and the patch is designed as so or sort of.
If device can know in advance that corotine isn't required, it just
calls qemu_aio_set_bypass_co() to notify block layer to not use
coroutine, that is the approach designed in this patch.
Thanks,
- Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode, (continued)
- Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode, Paolo Bonzini, 2014/07/30
- Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode, Ming Lei, 2014/07/30
- Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode, BenoƮt Canet, 2014/07/31
- Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode, Ming Lei, 2014/07/31
- Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode, Paolo Bonzini, 2014/07/31
- Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode, Ming Lei, 2014/07/31
- Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode, Paolo Bonzini, 2014/07/31
- Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode, Ming Lei, 2014/07/31
- Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode, Ming Lei, 2014/07/31
- Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode, Paolo Bonzini, 2014/07/31
- Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode,
Ming Lei <=
[Qemu-devel] [PATCH 02/15] qemu aio: prepare for supporting selective bypass coroutine, Ming Lei, 2014/07/30
[Qemu-devel] [PATCH 03/15] block: support to bypass qemu coroutinue, Ming Lei, 2014/07/30
[Qemu-devel] [PATCH 04/15] Revert "raw-posix: drop raw_get_aio_fd() since it is no longer used", Ming Lei, 2014/07/30
[Qemu-devel] [PATCH 05/15] dataplane: enable selective bypassing coroutine, Ming Lei, 2014/07/30
[Qemu-devel] [PATCH 06/15] qemu/obj_pool.h: introduce object allocation pool, Ming Lei, 2014/07/30
[Qemu-devel] [PATCH 07/15] dataplane: use object pool to speed up allocation for virtio blk request, Ming Lei, 2014/07/30