qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v11 13/13] block: apply COR-filter to block-stream jobs


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v11 13/13] block: apply COR-filter to block-stream jobs
Date: Fri, 16 Oct 2020 18:45:22 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.2

15.10.2020 20:16, Andrey Shinkevich wrote:
On 14.10.2020 19:24, Max Reitz wrote:
On 12.10.20 19:43, Andrey Shinkevich wrote:

[...]

---
  block/stream.c             | 93 +++++++++++++++++++++++++++++-----------------
  tests/qemu-iotests/030     | 51 +++----------------------
  tests/qemu-iotests/030.out |  4 +-
  tests/qemu-iotests/141.out |  2 +-
  tests/qemu-iotests/245     | 19 +++++++---
  5 files changed, 81 insertions(+), 88 deletions(-)

Looks like stream_run() could be a bit streamlined now (the allocation
checking should be unnecessary, unconditionally calling
stream_populate() should be sufficient), but not necessary now.


That is what I had kept in my mind when I tackled this patch. But there is an 
underwater reef to streamline. Namely, how the block-stream job gets known 
about a long unallocated tail to exit the loop earlier in the stream_run(). 
Shall we return the '-EOF' or another error code from the cor_co_preadv_part() 
to be handled by the stream_run()? Any other suggestions, if any, will be 
appreciated.

Just calling read CHUNK by CHUNK may be less efficient than 
is_allocated()-driven loop: you may end up with splitting regions unaligned to 
CHUNK-granularity, which would not be splitted with is_allocated()-driven loop. 
Current loop allows chunks unaligned to CHUNK.

So, I think, it's better to keep is_allocated() logic as is for now.



--
Best regards,
Vladimir



reply via email to

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