[Qemu-devel] [PATCH v3 for-4.2 0/3] block: BDRV_REQ_PREFETCH

Vladimir Sementsov-Ogievskiy posted 3 patches 4 years, 9 months ago
Test s390x passed
Test asan passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190725100550.33801-1-vsementsov@virtuozzo.com
Maintainers: Stefan Hajnoczi <stefanha@redhat.com>, Fam Zheng <fam@euphon.net>, John Snow <jsnow@redhat.com>, Eric Blake <eblake@redhat.com>, Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
include/block/block.h |  8 +++++++-
block/io.c            | 18 ++++++++++++------
block/stream.c        | 20 +++++++-------------
nbd/server.c          | 43 +++++++++++++++++++++++++++++++++++--------
4 files changed, 61 insertions(+), 28 deletions(-)
[Qemu-devel] [PATCH v3 for-4.2 0/3] block: BDRV_REQ_PREFETCH
Posted by Vladimir Sementsov-Ogievskiy 4 years, 9 months ago
Hi all!

Here is small new read flag: BDRV_REQ_PREFETCH, which in combination with
BDRV_REQ_COPY_ON_READ does copy-on-read without
extra buffer for read data. This means that only parts that needs COR
will be actually read and only corresponding buffers allocated, no more.

This allows to improve a bit block-stream and NBD_CMD_CACHE

v3: rebase 02 on master, fix commit message of 03.

v2: change interface to be just one flag BDRV_REQ_PREFETCH

v1 was "[PATCH 0/3] block: blk_co_pcache"
   https://lists.gnu.org/archive/html/qemu-devel/2019-06/msg01047.html

Vladimir Sementsov-Ogievskiy (3):
  block: implement BDRV_REQ_PREFETCH
  block/stream: use BDRV_REQ_PREFETCH
  nbd: improve CMD_CACHE: use BDRV_REQ_PREFETCH

 include/block/block.h |  8 +++++++-
 block/io.c            | 18 ++++++++++++------
 block/stream.c        | 20 +++++++-------------
 nbd/server.c          | 43 +++++++++++++++++++++++++++++++++++--------
 4 files changed, 61 insertions(+), 28 deletions(-)

-- 
2.18.0


Re: [Qemu-devel] [Qemu-block] [PATCH v3 for-4.2 0/3] block: BDRV_REQ_PREFETCH
Posted by Stefan Hajnoczi 4 years, 9 months ago
On Thu, Jul 25, 2019 at 01:05:47PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Hi all!
> 
> Here is small new read flag: BDRV_REQ_PREFETCH, which in combination with
> BDRV_REQ_COPY_ON_READ does copy-on-read without
> extra buffer for read data. This means that only parts that needs COR
> will be actually read and only corresponding buffers allocated, no more.
> 
> This allows to improve a bit block-stream and NBD_CMD_CACHE
> 
> v3: rebase 02 on master, fix commit message of 03.
> 
> v2: change interface to be just one flag BDRV_REQ_PREFETCH
> 
> v1 was "[PATCH 0/3] block: blk_co_pcache"
>    https://lists.gnu.org/archive/html/qemu-devel/2019-06/msg01047.html
> 
> Vladimir Sementsov-Ogievskiy (3):
>   block: implement BDRV_REQ_PREFETCH
>   block/stream: use BDRV_REQ_PREFETCH
>   nbd: improve CMD_CACHE: use BDRV_REQ_PREFETCH
> 
>  include/block/block.h |  8 +++++++-
>  block/io.c            | 18 ++++++++++++------
>  block/stream.c        | 20 +++++++-------------
>  nbd/server.c          | 43 +++++++++++++++++++++++++++++++++++--------
>  4 files changed, 61 insertions(+), 28 deletions(-)
> 
> -- 
> 2.18.0
> 
> 

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Re: [Qemu-devel] [Qemu-block] [PATCH v3 for-4.2 0/3] block: BDRV_REQ_PREFETCH
Posted by Vladimir Sementsov-Ogievskiy 4 years, 9 months ago
29.07.2019 18:00, Stefan Hajnoczi wrote:
> On Thu, Jul 25, 2019 at 01:05:47PM +0300, Vladimir Sementsov-Ogievskiy wrote:
>> Hi all!
>>
>> Here is small new read flag: BDRV_REQ_PREFETCH, which in combination with
>> BDRV_REQ_COPY_ON_READ does copy-on-read without
>> extra buffer for read data. This means that only parts that needs COR
>> will be actually read and only corresponding buffers allocated, no more.
>>
>> This allows to improve a bit block-stream and NBD_CMD_CACHE
>>
>> v3: rebase 02 on master, fix commit message of 03.
>>
>> v2: change interface to be just one flag BDRV_REQ_PREFETCH
>>
>> v1 was "[PATCH 0/3] block: blk_co_pcache"
>>     https://lists.gnu.org/archive/html/qemu-devel/2019-06/msg01047.html
>>
>> Vladimir Sementsov-Ogievskiy (3):
>>    block: implement BDRV_REQ_PREFETCH
>>    block/stream: use BDRV_REQ_PREFETCH
>>    nbd: improve CMD_CACHE: use BDRV_REQ_PREFETCH
>>
>>   include/block/block.h |  8 +++++++-
>>   block/io.c            | 18 ++++++++++++------
>>   block/stream.c        | 20 +++++++-------------
>>   nbd/server.c          | 43 +++++++++++++++++++++++++++++++++++--------
>>   4 files changed, 61 insertions(+), 28 deletions(-)
>>
>> -- 
>> 2.18.0
>>
>>
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> 

Thank you for reviewing!

-- 
Best regards,
Vladimir

Re: [Qemu-devel] [Qemu-block] [PATCH v3 for-4.2 0/3] block: BDRV_REQ_PREFETCH
Posted by Eric Blake 4 years, 9 months ago
On 7/29/19 10:00 AM, Stefan Hajnoczi wrote:
> On Thu, Jul 25, 2019 at 01:05:47PM +0300, Vladimir Sementsov-Ogievskiy wrote:
>> Hi all!
>>
>> Here is small new read flag: BDRV_REQ_PREFETCH, which in combination with
>> BDRV_REQ_COPY_ON_READ does copy-on-read without
>> extra buffer for read data. This means that only parts that needs COR
>> will be actually read and only corresponding buffers allocated, no more.
>>
>> This allows to improve a bit block-stream and NBD_CMD_CACHE
>>
>> v3: rebase 02 on master, fix commit message of 03.
>>
>> v2: change interface to be just one flag BDRV_REQ_PREFETCH
>>
>> v1 was "[PATCH 0/3] block: blk_co_pcache"
>>    https://lists.gnu.org/archive/html/qemu-devel/2019-06/msg01047.html
>>
>> Vladimir Sementsov-Ogievskiy (3):
>>   block: implement BDRV_REQ_PREFETCH
>>   block/stream: use BDRV_REQ_PREFETCH
>>   nbd: improve CMD_CACHE: use BDRV_REQ_PREFETCH
>>
>>  include/block/block.h |  8 +++++++-
>>  block/io.c            | 18 ++++++++++++------
>>  block/stream.c        | 20 +++++++-------------
>>  nbd/server.c          | 43 +++++++++++++++++++++++++++++++++++--------
>>  4 files changed, 61 insertions(+), 28 deletions(-)
>>
>> -- 
>> 2.18.0
>>
>>
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> 

I'm happy to queue this one through my NBD tree for 4.2.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org