qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH] block/io: optimize bdrv_co_pwritev for small re


From: Paolo Bonzini
Subject: Re: [Qemu-block] [PATCH] block/io: optimize bdrv_co_pwritev for small requests
Date: Tue, 24 May 2016 16:20:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0


On 24/05/2016 16:07, Peter Lieven wrote:
> 
> Oh, thanks, and the if block also too complicated. If I am right it should
> collapse to:
> 
>         if (bytes < align) {
>             qemu_iovec_add(&local_qiov, head_buf + bytes,
>                            align - bytes);
>             bytes = align;
>         }
> 
> Right?

Yes, that should work.  But add a comment because it's much more
mysterious than your v1 patch. :)

Even just

        /* We have read the tail already if the request is smaller
         * than one aligned block.
         */

Thanks,

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]