Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-24 Thread Eric Blake
On 1/24/19 9:39 AM, Kevin Wolf wrote: >>> >>> Hmm, and one more idea from Den: >>> >>> We can detect preallocated image, comparing allocated size of real file with >>> number of non-zero qcow2 refcounts. So, real allocation is much less than >>> allocation in qcow2 point of view, we'll enable

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-24 Thread Vladimir Sementsov-Ogievskiy
24.01.2019 18:39, Kevin Wolf wrote: > Am 24.01.2019 um 15:37 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 23.01.2019 15:04, Vladimir Sementsov-Ogievskiy wrote: >>> 22.01.2019 21:57, Kevin Wolf wrote: Am 11.01.2019 um 12:40 hat Vladimir Sementsov-Ogievskiy geschrieben: > 11.01.2019

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-24 Thread Vladimir Sementsov-Ogievskiy
24.01.2019 18:31, Kevin Wolf wrote: > Am 24.01.2019 um 15:36 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 23.01.2019 19:33, Kevin Wolf wrote: >>> Am 23.01.2019 um 12:53 hat Vladimir Sementsov-Ogievskiy geschrieben: 22.01.2019 21:57, Kevin Wolf wrote: > Am 11.01.2019 um 12:40 hat

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-24 Thread Kevin Wolf
Am 24.01.2019 um 15:36 hat Vladimir Sementsov-Ogievskiy geschrieben: > 23.01.2019 19:33, Kevin Wolf wrote: > > Am 23.01.2019 um 12:53 hat Vladimir Sementsov-Ogievskiy geschrieben: > >> 22.01.2019 21:57, Kevin Wolf wrote: > >>> Am 11.01.2019 um 12:40 hat Vladimir Sementsov-Ogievskiy geschrieben: >

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-24 Thread Kevin Wolf
Am 24.01.2019 um 15:37 hat Vladimir Sementsov-Ogievskiy geschrieben: > 23.01.2019 15:04, Vladimir Sementsov-Ogievskiy wrote: > > 22.01.2019 21:57, Kevin Wolf wrote: > >> Am 11.01.2019 um 12:40 hat Vladimir Sementsov-Ogievskiy geschrieben: > >>> 11.01.2019 13:41, Kevin Wolf wrote: > Am

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-24 Thread Vladimir Sementsov-Ogievskiy
23.01.2019 19:33, Kevin Wolf wrote: > Am 23.01.2019 um 12:53 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 22.01.2019 21:57, Kevin Wolf wrote: >>> Am 11.01.2019 um 12:40 hat Vladimir Sementsov-Ogievskiy geschrieben: 11.01.2019 13:41, Kevin Wolf wrote: > Am 10.01.2019 um 14:20 hat

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-24 Thread Vladimir Sementsov-Ogievskiy
23.01.2019 15:04, Vladimir Sementsov-Ogievskiy wrote: > 22.01.2019 21:57, Kevin Wolf wrote: >> Am 11.01.2019 um 12:40 hat Vladimir Sementsov-Ogievskiy geschrieben: >>> 11.01.2019 13:41, Kevin Wolf wrote: Am 10.01.2019 um 14:20 hat Vladimir Sementsov-Ogievskiy geschrieben: >

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-23 Thread Kevin Wolf
Am 23.01.2019 um 12:53 hat Vladimir Sementsov-Ogievskiy geschrieben: > 22.01.2019 21:57, Kevin Wolf wrote: > > Am 11.01.2019 um 12:40 hat Vladimir Sementsov-Ogievskiy geschrieben: > >> 11.01.2019 13:41, Kevin Wolf wrote: > >>> Am 10.01.2019 um 14:20 hat Vladimir Sementsov-Ogievskiy geschrieben: >

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-23 Thread Vladimir Sementsov-Ogievskiy
22.01.2019 21:57, Kevin Wolf wrote: > Am 11.01.2019 um 12:40 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 11.01.2019 13:41, Kevin Wolf wrote: >>> Am 10.01.2019 um 14:20 hat Vladimir Sementsov-Ogievskiy geschrieben: drv_co_block_status digs bs->file for additional, more accurate search

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-23 Thread Vladimir Sementsov-Ogievskiy
22.01.2019 21:57, Kevin Wolf wrote: > Am 11.01.2019 um 12:40 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 11.01.2019 13:41, Kevin Wolf wrote: >>> Am 10.01.2019 um 14:20 hat Vladimir Sementsov-Ogievskiy geschrieben: drv_co_block_status digs bs->file for additional, more accurate search

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-22 Thread Kevin Wolf
Am 11.01.2019 um 12:40 hat Vladimir Sementsov-Ogievskiy geschrieben: > 11.01.2019 13:41, Kevin Wolf wrote: > > Am 10.01.2019 um 14:20 hat Vladimir Sementsov-Ogievskiy geschrieben: > >> drv_co_block_status digs bs->file for additional, more accurate search > >> for hole inside region, reported as

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-11 Thread Vladimir Sementsov-Ogievskiy
On 11.01.2019 17:04, Eric Blake wrote: > On 1/11/19 10:09 AM, Vladimir Sementsov-Ogievskiy wrote: > > I suggested one: Pass large contiguous allocated ranges to the protocol > driver, but just assume that the allocation status is correct in the > format layer if they are small.

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-11 Thread Eric Blake
On 1/11/19 10:22 AM, Vladimir Sementsov-Ogievskiy wrote: >> Even a dumb most-recent use cache will speed this up: both the second >> and third queries above can be avoided because we know that both 0x4 >> and 0x3 the second query at 0x4 can be skipped (0x4 is >> between our most

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-11 Thread Eric Blake
On 1/11/19 10:09 AM, Vladimir Sementsov-Ogievskiy wrote: I suggested one: Pass large contiguous allocated ranges to the protocol driver, but just assume that the allocation status is correct in the format layer if they are small. >>> >>> So, for fully allocated image, we will call

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-11 Thread Vladimir Sementsov-Ogievskiy
11.01.2019 19:02, Eric Blake wrote: > On 1/11/19 1:54 AM, Vladimir Sementsov-Ogievskiy wrote: > >>> >>> How much performance can we buy back without any knobs at all, if we >>> just taught posix-file.c to cache lseek() results? That is, when >>> visiting a file sequentially, if lseek(fd, 0,

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-11 Thread Vladimir Sementsov-Ogievskiy
11.01.2019 16:15, Kevin Wolf wrote: > Am 11.01.2019 um 13:59 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 11.01.2019 15:21, Kevin Wolf wrote: >>> Am 11.01.2019 um 12:40 hat Vladimir Sementsov-Ogievskiy geschrieben: 11.01.2019 13:41, Kevin Wolf wrote: > Am 10.01.2019 um 14:20 hat

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-11 Thread Eric Blake
On 1/11/19 10:02 AM, Eric Blake wrote: > Even a dumb most-recent use cache will speed this up: both the second > and third queries above can be avoided because we know that both 0x4 > and 0x3 the second query at 0x4 can be skipped (0x4 is > between our most recent lseek at 0x2

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-11 Thread Eric Blake
On 1/11/19 1:54 AM, Vladimir Sementsov-Ogievskiy wrote: >> >> How much performance can we buy back without any knobs at all, if we >> just taught posix-file.c to cache lseek() results? That is, when >> visiting a file sequentially, if lseek(fd, 0, SEEK_HOLE) returns EOF on >> our first block

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-11 Thread Kevin Wolf
Am 11.01.2019 um 13:59 hat Vladimir Sementsov-Ogievskiy geschrieben: > 11.01.2019 15:21, Kevin Wolf wrote: > > Am 11.01.2019 um 12:40 hat Vladimir Sementsov-Ogievskiy geschrieben: > >> 11.01.2019 13:41, Kevin Wolf wrote: > >>> Am 10.01.2019 um 14:20 hat Vladimir Sementsov-Ogievskiy geschrieben: >

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-11 Thread Vladimir Sementsov-Ogievskiy
11.01.2019 15:21, Kevin Wolf wrote: > Am 11.01.2019 um 12:40 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 11.01.2019 13:41, Kevin Wolf wrote: >>> Am 10.01.2019 um 14:20 hat Vladimir Sementsov-Ogievskiy geschrieben: drv_co_block_status digs bs->file for additional, more accurate search

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-11 Thread Kevin Wolf
Am 11.01.2019 um 12:40 hat Vladimir Sementsov-Ogievskiy geschrieben: > 11.01.2019 13:41, Kevin Wolf wrote: > > Am 10.01.2019 um 14:20 hat Vladimir Sementsov-Ogievskiy geschrieben: > >> drv_co_block_status digs bs->file for additional, more accurate search > >> for hole inside region, reported as

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-11 Thread Vladimir Sementsov-Ogievskiy
11.01.2019 13:41, Kevin Wolf wrote: > Am 10.01.2019 um 14:20 hat Vladimir Sementsov-Ogievskiy geschrieben: >> drv_co_block_status digs bs->file for additional, more accurate search >> for hole inside region, reported as DATA by bs since 5daa74a6ebc. >> >> This accuracy is not free: assume we have

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-11 Thread Kevin Wolf
Am 10.01.2019 um 14:20 hat Vladimir Sementsov-Ogievskiy geschrieben: > drv_co_block_status digs bs->file for additional, more accurate search > for hole inside region, reported as DATA by bs since 5daa74a6ebc. > > This accuracy is not free: assume we have qcow2 disk. Actually, qcow2 > knows,

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-11 Thread Vladimir Sementsov-Ogievskiy
11.01.2019 10:54, Vladimir Sementsov-Ogievskiy wrote: > 10.01.2019 23:51, Eric Blake wrote: >> On 1/10/19 7:20 AM, Vladimir Sementsov-Ogievskiy wrote: >>> drv_co_block_status digs bs->file for additional, more accurate search >>> for hole inside region, reported as DATA by bs since 5daa74a6ebc. >>

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-11 Thread Vladimir Sementsov-Ogievskiy
10.01.2019 23:51, Eric Blake wrote: > On 1/10/19 7:20 AM, Vladimir Sementsov-Ogievskiy wrote: >> drv_co_block_status digs bs->file for additional, more accurate search >> for hole inside region, reported as DATA by bs since 5daa74a6ebc. > > s/region, reported/regions reported/ > >> >> This

Re: [Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-10 Thread Eric Blake
On 1/10/19 7:20 AM, Vladimir Sementsov-Ogievskiy wrote: > drv_co_block_status digs bs->file for additional, more accurate search > for hole inside region, reported as DATA by bs since 5daa74a6ebc. s/region, reported/regions reported/ > > This accuracy is not free: assume we have qcow2 disk.

[Qemu-devel] [PATCH] block: don't probe zeroes in bs->file by default on block_status

2019-01-10 Thread Vladimir Sementsov-Ogievskiy
drv_co_block_status digs bs->file for additional, more accurate search for hole inside region, reported as DATA by bs since 5daa74a6ebc. This accuracy is not free: assume we have qcow2 disk. Actually, qcow2 knows, where are holes and where is data. But every block_status request calls lseek