Re: [Qemu-devel] [PATCH 1/1] qcow2: avoid extra flushes in qcow2

2016-06-03 Thread Kevin Wolf
Am 02.06.2016 um 17:58 hat Denis V. Lunev geschrieben: > The problem with excessive flushing was found by a couple of performance > tests: > - parallel directory tree creation (from 2 processes) > - 32 cached writes + fsync at the end in a loop > > For the first one results improved from 2.6 l

[Qemu-devel] [PATCH 1/1] qcow2: avoid extra flushes in qcow2

2016-06-02 Thread Denis V. Lunev
The problem with excessive flushing was found by a couple of performance tests: - parallel directory tree creation (from 2 processes) - 32 cached writes + fsync at the end in a loop For the first one results improved from 2.6 loops/sec to 3.5 loops/sec. Each loop creates 10^3 directories with

Re: [Qemu-devel] [PATCH 1/1] qcow2: avoid extra flushes in qcow2

2016-06-02 Thread Pavel Borzenkov
On Wed, Jun 01, 2016 at 12:07:01PM +0200, Kevin Wolf wrote: > Am 01.06.2016 um 11:12 hat Denis V. Lunev geschrieben: > > qcow2_cache_flush() calls bdrv_flush() unconditionally after writing > > cache entries of a particular cache. This can lead to as many as > > 2 additional fdatasyncs inside bdrv_

Re: [Qemu-devel] [PATCH 1/1] qcow2: avoid extra flushes in qcow2

2016-06-01 Thread Pavel Borzenkov
On Wed, Jun 01, 2016 at 12:07:01PM +0200, Kevin Wolf wrote: > Am 01.06.2016 um 11:12 hat Denis V. Lunev geschrieben: > > qcow2_cache_flush() calls bdrv_flush() unconditionally after writing > > cache entries of a particular cache. This can lead to as many as > > 2 additional fdatasyncs inside bdrv_

Re: [Qemu-devel] [PATCH 1/1] qcow2: avoid extra flushes in qcow2

2016-06-01 Thread Kevin Wolf
Am 01.06.2016 um 11:12 hat Denis V. Lunev geschrieben: > qcow2_cache_flush() calls bdrv_flush() unconditionally after writing > cache entries of a particular cache. This can lead to as many as > 2 additional fdatasyncs inside bdrv_flush. > > We can simply skip all fdatasync calls inside qcow2_co_f

[Qemu-devel] [PATCH 1/1] qcow2: avoid extra flushes in qcow2

2016-06-01 Thread Denis V. Lunev
qcow2_cache_flush() calls bdrv_flush() unconditionally after writing cache entries of a particular cache. This can lead to as many as 2 additional fdatasyncs inside bdrv_flush. We can simply skip all fdatasync calls inside qcow2_co_flush_to_os as bdrv_flush for sure will do the job. This seriously