From patchwork Mon Sep 4 12:15:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 9937049 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3FB5D6038C for ; Mon, 4 Sep 2017 12:15:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C51528713 for ; Mon, 4 Sep 2017 12:15:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20B36287CB; Mon, 4 Sep 2017 12:15:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFCC528713 for ; Mon, 4 Sep 2017 12:15:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753492AbdIDMPD (ORCPT ); Mon, 4 Sep 2017 08:15:03 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:38693 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753477AbdIDMPC (ORCPT ); Mon, 4 Sep 2017 08:15:02 -0400 Received: by mail-wm0-f65.google.com with SMTP id u26so145981wma.5 for ; Mon, 04 Sep 2017 05:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=2zsZhTcKSqoZ7c1WGbJ+fM8fRziWeKCgYNccHHcjxkE=; b=UfM77/uaCj0nD7Bxzkt435YPLQoi3dr/uSjHIbCYKqkkcLIt1pMeSCnuRAnph+TqqO Q2BlfEqDqEP4FBug/j6YewHuIGGac8tx03eF48pwAiXLs3113DjiL4acCx/vy5ZhVZkg Wvpdj0PYy2H8EsZAfXEwogdTKx/Js7SGF3zf70idEdyPGJyn06LNHctU9uucuzIK6U9q W3mHATqpZmxwoUyCC+fm91sgXdX+S/pp+KtaLc9Sc+g8OxYIkQrgJPM3PEe8ZRCLDGvg xGmyXLMm7iwkhBuN79xGVsYawe5AMsb3Rr7fm20gwuEbu/7lgKN9HszSIcZR8XyKSAw5 VmqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2zsZhTcKSqoZ7c1WGbJ+fM8fRziWeKCgYNccHHcjxkE=; b=L3nB3CpHU0f/bZWbUiYcfg6ihiTWtYLzJt1RA4AxIx3cZiBPbYDBXOBka+HMJsYI9o ZTpa1xwv0ZyLM0xla0y9wf+sGhEgT5enYerX2GaAo0HfbwVoIwzSNZLjD+xZ1mRSq7Iw jwyHzdGJqcHoIJ3zzAh9H+eSdR9pHst220pJ62tkCmIprWxm3RBoOxiEpIZ2OrKeFvhn pYt4lKbN0jLjDQWkgQYJMWm1uHoCrM5+FZc3MCikXf/LlfjGFqPFHmOGfkR7JkGbElDB 1Yk7JJXG2GTZFIfSUD4vnlKp37wdcsanRjo7pZAqTkr2EU5GQgmWK7Nf4JVOkUHg+m2E h9Cg== X-Gm-Message-State: AHPjjUgDMOg+PdWg7EcmZThyioX6DgcLs44wS4GXRnkSbzYswIrCq5G4 vrjIDLX5OcYFWw== X-Google-Smtp-Source: ADKCNb4qf5NKOFDBKs1W/aOKZ/81NjM0SWY8skNl1BScKjpZ4Q2UgbcA61R45aFtZFIrSL0hAX9Hbw== X-Received: by 10.28.165.75 with SMTP id o72mr131402wme.193.1504527301554; Mon, 04 Sep 2017 05:15:01 -0700 (PDT) Received: from localhost.localdomain (bzq-166-168-31-246.red.bezeqint.net. [31.168.166.246]) by smtp.gmail.com with ESMTPSA id b196sm381121wmd.29.2017.09.04.05.15.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Sep 2017 05:15:01 -0700 (PDT) From: Amir Goldstein To: Theodore Ts'o Cc: Eryu Guan , Josef Bacik , fstests@vger.kernel.org Subject: [PATCH] kvm-xfstests: use aio=native for test drives Date: Mon, 4 Sep 2017 15:15:28 +0300 Message-Id: <1504527328-24615-1-git-send-email-amir73il@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Lost IOs have been observed with the default aio=threads with QEMU 2.5.0 when running crash consistency tests. The issue has not been observed with QEMU 2.9.0. Native AIO is probably better for our goal which is test proofing production systems. Signed-off-by: Amir Goldstein --- Ted, Not sure you have been following the crash consistency tests threads. Anyway, I ran into an issue of sucessfuly completed bio's that did not make it to storage device when running in kvm-xfstests. Josef reported that he did not observe the issue with newer QEMU and the issue is gone with aio=native on my version of QEMU. Crash consistency tests still can't run properly on kvm-xfstests without this fix to kernel: https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git/commit/?h=dm-log-writes-fixes&id=08c7d64773091c7d2e0147da7064aa4dc297629d After the fix is merged I will post a patch to enable running dm-log-write tests in kvm-xfstest. Mean while, the change to aio=native seems like a good move anyway and if I observed a bio black hole in one test, who's to say they don't exist for other tests as well. Amir. kvm-xfstests/kvm-xfstests | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/kvm-xfstests/kvm-xfstests b/kvm-xfstests/kvm-xfstests index 305e2f5..98bd76a 100755 --- a/kvm-xfstests/kvm-xfstests +++ b/kvm-xfstests/kvm-xfstests @@ -101,15 +101,22 @@ chmod 400 "$VDH" mkdir -p /tmp/kvm-xfstests-$USER +# Lost IOs have been observed with the default aio=threads with +# QEMU 2.5.0 when running crash consistency tests. +# The issue has not been observed with QEMU 2.9.0. +# Native AIO is probably better for our goal which is test proofing +# production systems. +AIO=",aio=native" + $NO_ACTION $IONICE $QEMU -boot order=c $NET \ -machine type=pc,accel=kvm:tcg \ -drive file=$ROOT_FS,if=virtio$SNAPSHOT \ - -drive file=$VDB,cache=none,if=virtio,format=raw \ - -drive file=$VDC,cache=none,if=virtio,format=raw \ - -drive file=$VDD,cache=none,if=virtio,format=raw \ - -drive file=$VDE,cache=none,if=virtio,format=raw \ - -drive file=$VDF,cache=none,if=virtio,format=raw \ - -drive file=$VDG,cache=none,if=virtio,format=raw \ + -drive file=$VDB,cache=none,if=virtio,format=raw$AIO \ + -drive file=$VDC,cache=none,if=virtio,format=raw$AIO \ + -drive file=$VDD,cache=none,if=virtio,format=raw$AIO \ + -drive file=$VDE,cache=none,if=virtio,format=raw$AIO \ + -drive file=$VDF,cache=none,if=virtio,format=raw$AIO \ + -drive file=$VDG,cache=none,if=virtio,format=raw$AIO \ -drive file=$VDH,cache=unsafe,readonly,if=virtio \ -vga none -nographic -smp $NR_CPU -m $MEM \ -fsdev local,id=v_tmp,path=/tmp/kvm-xfstests-$USER,security_model=none \