From patchwork Mon Jun 8 12:41:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 6564701 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1E9E59F3D1 for ; Mon, 8 Jun 2015 12:41:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1ACBF20524 for ; Mon, 8 Jun 2015 12:41:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EF5A820515 for ; Mon, 8 Jun 2015 12:41:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752317AbbFHMlz (ORCPT ); Mon, 8 Jun 2015 08:41:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38264 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751570AbbFHMlz (ORCPT ); Mon, 8 Jun 2015 08:41:55 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 2443F30D336 for ; Mon, 8 Jun 2015 12:41:55 +0000 (UTC) Received: from localhost (dhcp-12-136.nay.redhat.com [10.66.12.136]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t58CfrxM007068; Mon, 8 Jun 2015 08:41:54 -0400 From: Eryu Guan To: fstests@vger.kernel.org Cc: lczerner@redhat.com, Eryu Guan Subject: [PATCH v2] generic: concurrent IO test with mixed IO types Date: Mon, 8 Jun 2015 20:41:11 +0800 Message-Id: <1433767271-30562-1-git-send-email-eguan@redhat.com> In-Reply-To: <1433760101-25540-1-git-send-email-eguan@redhat.com> References: <1433760101-25540-1-git-send-email-eguan@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Test concurrent buffered I/O, DIO, AIO, mmap I/O and splice I/O on the same files. Signed-off-by: Eryu Guan Reviewed-by: Lukas Czerner --- This fio job file has been proven to be potent, it triggers WARNINGs on ext4 and xfs with 4.1-rc6 kernel. ext4: WARNING: at fs/ext4/inode.c:1328 xfs: WARNING: CPU: 7 PID: 3090 at fs/xfs/xfs_file.c:726 xfs_file_dio_aio_write+0x176/0x2a8 [xfs]() The ext4 issue should be fixed by Lukas's patch ext4: fix reservation release on invalidatepage for delalloc fs And it ever paniced kernel in mm code and hung xfs. I reduced the numjobs and iodepth to reduce the test time(~25s on my test host) and scale them by $LOAD_FACTOR. And it still could trigger the warning on ext4 and xfs with reduced workload. v2: - use mktemp to create tmp fio job file tests/generic/090 | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/090.out | 2 + tests/generic/group | 1 + 3 files changed, 123 insertions(+) create mode 100755 tests/generic/090 create mode 100644 tests/generic/090.out diff --git a/tests/generic/090 b/tests/generic/090 new file mode 100755 index 0000000..3521cd4 --- /dev/null +++ b/tests/generic/090 @@ -0,0 +1,120 @@ +#! /bin/bash +# FS QA Test generic/090 +# +# Concurrent mixed I/O (buffer I/O, aiodio, mmap, splice) on the same files +# +#----------------------------------------------------------------------- +# Copyright (c) 2015 Red Hat Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +fio_config=`mktemp` +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $fio_config +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter + +# real QA test starts here +_supported_fs generic +_supported_os Linux +_require_scratch + +iodepth=$((16 * LOAD_FACTOR)) +iodepth_batch=$((8 * LOAD_FACTOR)) +numjobs=$((5 * LOAD_FACTOR)) +cat >$fio_config <> $fio_config + +rm -f $seqres.full + +_require_fio $fio_config + +echo "Silence is golden" +$FIO_PROG $fio_config >>$seqres.full 2>&1 + +# all done, expect no hang no oops no fs corruption, +# _check_dmesg and _check_filesystems will do the check work for us +status=0 +exit diff --git a/tests/generic/090.out b/tests/generic/090.out new file mode 100644 index 0000000..2b5100d --- /dev/null +++ b/tests/generic/090.out @@ -0,0 +1,2 @@ +QA output created by 090 +Silence is golden diff --git a/tests/generic/group b/tests/generic/group index 0c8964c..2e534a5 100644 --- a/tests/generic/group +++ b/tests/generic/group @@ -92,6 +92,7 @@ 087 perms auto quick 088 perms auto quick 089 metadata auto +090 auto rw stress 091 rw auto quick 092 auto quick prealloc 093 attr cap udf auto