Re: [Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-02-04 Thread Paolo Bonzini
On 25/01/19 11:30, Kevin Wolf wrote: >> On the other hand, the AioContext lock is only used in >> some special cases around block jobs and blk_set_aio_context, and in >> general the block devices already should not have any dependencies >> (unless they crept in without me noticing). > It's also use

Re: [Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-01-29 Thread Eric Blake
On 1/29/19 4:56 AM, Kevin Wolf wrote: >> gluster copies heavily from file-posix's implementation; should it also >> copy this cache of known-data? Should NBD also cache known-data when >> NBD_CMD_BLOCK_STATUS is available? > > This almost suggests that we should do the caching in generic block >

Re: [Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-01-29 Thread Kevin Wolf
Am 24.01.2019 um 16:56 hat Eric Blake geschrieben: > On 1/24/19 8:17 AM, Kevin Wolf wrote: > > Depending on the exact image layout and the storage backend (tmpfs is > > konwn to have very slow SEEK_HOLE/SEEK_DATA), caching lseek results can > > save us a lot of time e.g. during a mirror block job o

Re: [Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-01-25 Thread Eric Blake
On 1/25/19 3:13 AM, Vladimir Sementsov-Ogievskiy wrote: > > before your patch: > ]# ./test > Formatting 'x', fmt=raw size=1048576 > qemu-io> wrote 1048576/1048576 bytes at offset 0 > 1 MiB, 1 ops; 0.0523 sec (19.093 MiB/sec and 19.0927 ops/sec) > qemu-io> [{ "start": 0, "length": 1048576, "depth"

Re: [Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-01-25 Thread Kevin Wolf
Am 25.01.2019 um 11:10 hat Paolo Bonzini geschrieben: > On 24/01/19 16:42, Kevin Wolf wrote: > >> Recently Paolo asked me not to add more users of AioContext lock. > >> Unfortunately > >> I don't understand the whole picture around it.. Doesn't this apply here? > >> https://lists.gnu.org/archive/h

Re: [Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-01-25 Thread Paolo Bonzini
On 24/01/19 16:42, Kevin Wolf wrote: >> Recently Paolo asked me not to add more users of AioContext lock. >> Unfortunately >> I don't understand the whole picture around it.. Doesn't this apply here? >> https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg03410.html > I don't know. Honestly I

Re: [Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-01-25 Thread Vladimir Sementsov-Ogievskiy
24.01.2019 19:36, Kevin Wolf wrote: > Am 24.01.2019 um 17:18 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 24.01.2019 17:17, Kevin Wolf wrote: >>> Depending on the exact image layout and the storage backend (tmpfs is >>> konwn to have very slow SEEK_HOLE/SEEK_DATA), caching lseek results can >>>

Re: [Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-01-24 Thread Kevin Wolf
Am 24.01.2019 um 17:18 hat Vladimir Sementsov-Ogievskiy geschrieben: > 24.01.2019 17:17, Kevin Wolf wrote: > > Depending on the exact image layout and the storage backend (tmpfs is > > konwn to have very slow SEEK_HOLE/SEEK_DATA), caching lseek results can > > save us a lot of time e.g. during a mi

Re: [Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-01-24 Thread Vladimir Sementsov-Ogievskiy
24.01.2019 17:17, Kevin Wolf wrote: > Depending on the exact image layout and the storage backend (tmpfs is > konwn to have very slow SEEK_HOLE/SEEK_DATA), caching lseek results can > save us a lot of time e.g. during a mirror block job or qemu-img convert > with a fragmented source image (.bdrv_co

Re: [Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-01-24 Thread Eric Blake
On 1/24/19 8:17 AM, Kevin Wolf wrote: > Depending on the exact image layout and the storage backend (tmpfs is > konwn to have very slow SEEK_HOLE/SEEK_DATA), caching lseek results can > save us a lot of time e.g. during a mirror block job or qemu-img convert > with a fragmented source image (.bdrv_

Re: [Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-01-24 Thread Kevin Wolf
Am 24.01.2019 um 16:22 hat Vladimir Sementsov-Ogievskiy geschrieben: > 24.01.2019 18:11, Kevin Wolf wrote: > > Am 24.01.2019 um 15:40 hat Vladimir Sementsov-Ogievskiy geschrieben: > >> 24.01.2019 17:17, Kevin Wolf wrote: > >>> Depending on the exact image layout and the storage backend (tmpfs is >

Re: [Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-01-24 Thread Vladimir Sementsov-Ogievskiy
24.01.2019 18:11, Kevin Wolf wrote: > Am 24.01.2019 um 15:40 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 24.01.2019 17:17, Kevin Wolf wrote: >>> Depending on the exact image layout and the storage backend (tmpfs is >>> konwn to have very slow SEEK_HOLE/SEEK_DATA), caching lseek results can >>>

Re: [Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-01-24 Thread Kevin Wolf
Am 24.01.2019 um 15:40 hat Vladimir Sementsov-Ogievskiy geschrieben: > 24.01.2019 17:17, Kevin Wolf wrote: > > Depending on the exact image layout and the storage backend (tmpfs is > > konwn to have very slow SEEK_HOLE/SEEK_DATA), caching lseek results can > > save us a lot of time e.g. during a mi

Re: [Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-01-24 Thread Vladimir Sementsov-Ogievskiy
24.01.2019 17:17, Kevin Wolf wrote: > Depending on the exact image layout and the storage backend (tmpfs is > konwn to have very slow SEEK_HOLE/SEEK_DATA), caching lseek results can > save us a lot of time e.g. during a mirror block job or qemu-img convert > with a fragmented source image (.bdrv_co

[Qemu-devel] [PATCH] file-posix: Cache lseek result for data regions

2019-01-24 Thread Kevin Wolf
Depending on the exact image layout and the storage backend (tmpfs is konwn to have very slow SEEK_HOLE/SEEK_DATA), caching lseek results can save us a lot of time e.g. during a mirror block job or qemu-img convert with a fragmented source image (.bdrv_co_block_status on the protocol layer can be c