From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Anton Nefedov <anton.nefedov@virtuozzo.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [PATCH for-4.2 0/4] qcow2: Fix data corruption on XFS
Date: Fri, 1 Nov 2019 11:20:13 +0100 [thread overview]
Message-ID: <fbf32283-2ec5-28ae-f4c9-5bd7d4af7b3f@redhat.com> (raw)
In-Reply-To: <20191101100019.9512-1-mreitz@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 3922 bytes --]
On 01.11.19 11:00, Max Reitz wrote:
> Hi,
>
> This series builds on the previous RFC. The workaround is now applied
> unconditionally of AIO mode and filesystem because we don’t know those
> things for remote filesystems. Furthermore, bdrv_co_get_self_request()
> has been moved to block/io.c.
>
> Applying the workaround unconditionally is fine from a performance
> standpoint, because it should actually be dead code, thanks to patch 1
> (the elephant in the room). As far as I know, there is no other block
> driver but qcow2 in handle_alloc_space() that would submit zero writes
> as part of normal I/O so it can occur concurrently to other write
> requests. It still makes sense to take the workaround for file-posix
> because we can’t really prevent that any other block driver will submit
> zero writes as part of normal I/O in the future.
>
> Anyway, let’s get to the elephant.
>
> From input by XFS developers
> (https://bugzilla.redhat.com/show_bug.cgi?id=1765547#c7) it seems clear
> that c8bb23cbdbe causes fundamental performance problems on XFS with
> aio=native that cannot be fixed. In other cases, c8bb23cbdbe improves
> performance or we wouldn’t have it.
>
> In general, avoiding performance regressions is more important than
> improving performance, unless the regressions are just a minor corner
> case or insignificant when compared to the improvement. The XFS
> regression is no minor corner case, and it isn’t insignificant. Laurent
> Vivier has found performance to decrease by as much as 88 % (on ppc64le,
> fio in a guest with 4k blocks, iodepth=8: 1662 kB/s from 13.9 MB/s).
Ah, crap.
I wanted to send this series as early today as possible to get as much
feedback as possible, so I’ve only started doing benchmarks now.
The obvious
$ qemu-img bench -t none -n -w -S 65536 test.qcow2
on XFS takes like 6 seconds on master, and like 50 to 80 seconds with
c8bb23cbdbe reverted. So now on to guest tests...
(Well, and the question is still where the performance regression on
ppc64 comes from.)
Max
> Thus, I believe we should revert the commit for now (and most
> importantly for 4.1.1). We can think about reintroducing it for 5.0,
> but that would require more extensive benchmarks on a variety of
> systems, and we must see how subclusters change the picture.
>
>
> I would have liked to do benchmarks myself before making this decision,
> but as far as I’m informed, patches for 4.1.1 are to be collected on
> Monday, so we need to be quick.
>
>
> git-backport-diff against the RFC:
>
> Key:
> [----] : patches are identical
> [####] : number of functional differences between upstream/downstream patch
> [down] : patch is downstream-only
> The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively
>
> 001/4:[down] 'Revert "qcow2: skip writing zero buffers to empty COW areas"'
> 002/4:[----] [-C] 'block: Make wait/mark serialising requests public'
> 003/4:[down] 'block: Add bdrv_co_get_self_request()'
> 004/4:[0036] [FC] 'block/file-posix: Let post-EOF fallocate serialize'
>
>
> Max Reitz (4):
> Revert "qcow2: skip writing zero buffers to empty COW areas"
> block: Make wait/mark serialising requests public
> block: Add bdrv_co_get_self_request()
> block/file-posix: Let post-EOF fallocate serialize
>
> qapi/block-core.json | 4 +-
> block/qcow2.h | 6 ---
> include/block/block_int.h | 4 ++
> block/file-posix.c | 38 +++++++++++++++++
> block/io.c | 42 +++++++++++++------
> block/qcow2-cluster.c | 2 +-
> block/qcow2.c | 86 --------------------------------------
> block/trace-events | 1 -
> tests/qemu-iotests/060 | 7 +---
> tests/qemu-iotests/060.out | 5 +--
> 10 files changed, 76 insertions(+), 119 deletions(-)
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-11-01 10:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-01 10:00 [PATCH for-4.2 0/4] qcow2: Fix data corruption on XFS Max Reitz
2019-11-01 10:00 ` [PATCH for-4.2 1/4] Revert "qcow2: skip writing zero buffers to empty COW areas" Max Reitz
2019-11-01 10:22 ` Vladimir Sementsov-Ogievskiy
2019-11-01 12:40 ` Eric Blake
2019-11-01 14:01 ` Max Reitz
2019-11-01 15:42 ` Kevin Wolf
2019-11-01 16:02 ` Max Reitz
2019-11-01 10:00 ` [PATCH for-4.2 2/4] block: Make wait/mark serialising requests public Max Reitz
2019-11-01 10:00 ` [PATCH for-4.2 3/4] block: Add bdrv_co_get_self_request() Max Reitz
2019-11-01 10:00 ` [PATCH for-4.2 4/4] block/file-posix: Let post-EOF fallocate serialize Max Reitz
2019-11-01 10:20 ` Max Reitz [this message]
2019-11-01 10:28 ` [PATCH for-4.2 0/4] qcow2: Fix data corruption on XFS Vladimir Sementsov-Ogievskiy
2019-11-01 11:12 ` Max Reitz
2019-11-01 11:16 ` Vladimir Sementsov-Ogievskiy
2019-11-01 11:20 ` Max Reitz
2019-11-01 12:34 ` Max Reitz
2019-11-01 13:09 ` Vladimir Sementsov-Ogievskiy
2019-11-01 13:36 ` Denis Lunev
2019-11-01 13:40 ` Max Reitz
2019-11-01 13:30 ` Max Reitz
2019-11-01 15:06 ` Max Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fbf32283-2ec5-28ae-f4c9-5bd7d4af7b3f@redhat.com \
--to=mreitz@redhat.com \
--cc=anton.nefedov@virtuozzo.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vsementsov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).