Re: [Qemu-block] [PATCH v10 04/17] qcow2: Optimize zero_single_l2() to minimize L2 churn

2017-04-28 Thread Eric Blake
On 04/28/2017 01:00 PM, Max Reitz wrote: > On 27.04.2017 03:46, Eric Blake wrote: >> Similar to discard_single_l2(), we should try to avoid dirtying >> the L2 cache when the cluster we are changing already has the >> right characteristics. >> >> -/* Update L2 entries */ >> +/* >> +

Re: [Qemu-block] [PATCH v10 04/17] qcow2: Optimize zero_single_l2() to minimize L2 churn

2017-04-28 Thread Max Reitz
On 27.04.2017 03:46, Eric Blake wrote: > Similar to discard_single_l2(), we should try to avoid dirtying > the L2 cache when the cluster we are changing already has the > right characteristics. > > Note that by the time we get to zero_single_l2(), BDRV_REQ_MAY_UNMAP > is a requirement to unallocat

[Qemu-block] [PATCH v10 04/17] qcow2: Optimize zero_single_l2() to minimize L2 churn

2017-04-26 Thread Eric Blake
Similar to discard_single_l2(), we should try to avoid dirtying the L2 cache when the cluster we are changing already has the right characteristics. Note that by the time we get to zero_single_l2(), BDRV_REQ_MAY_UNMAP is a requirement to unallocate a cluster (this is because the block layer clears