From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B028C433E0 for ; Tue, 23 Jun 2020 06:01:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F87620716 for ; Tue, 23 Jun 2020 06:01:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730447AbgFWGBc (ORCPT ); Tue, 23 Jun 2020 02:01:32 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:46618 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730081AbgFWGBb (ORCPT ); Tue, 23 Jun 2020 02:01:31 -0400 X-IronPort-AV: E=Sophos;i="5.75,270,1589212800"; d="scan'208";a="95131674" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 23 Jun 2020 14:01:05 +0800 Received: from G08CNEXMBPEKD06.g08.fujitsu.local (unknown [10.167.33.206]) by cn.fujitsu.com (Postfix) with ESMTP id 7E1364CE4B00; Tue, 23 Jun 2020 13:50:38 +0800 (CST) Received: from [10.167.220.69] (10.167.220.69) by G08CNEXMBPEKD06.g08.fujitsu.local (10.167.33.206) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 23 Jun 2020 14:00:58 +0800 Message-ID: <5EF19A99.7020604@cn.fujitsu.com> Date: Tue, 23 Jun 2020 14:00:57 +0800 From: Xiao Yang User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.2; zh-CN; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 To: CC: Xiao Yang , , , Subject: Re: [PATCH v2 5/6] generic/413, xfs/260: Improve format operation for PMD fault testing References: <20200617093204.20838-1-ice_yangxiao@163.com> <20200617093204.20838-6-ice_yangxiao@163.com> In-Reply-To: <20200617093204.20838-6-ice_yangxiao@163.com> Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.220.69] X-ClientProxiedBy: G08CNEXCHPEKD06.g08.fujitsu.local (10.167.33.205) To G08CNEXMBPEKD06.g08.fujitsu.local (10.167.33.206) X-yoursite-MailScanner-ID: 7E1364CE4B00.AAD58 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: yangx.jy@cn.fujitsu.com Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Hi Darrick, Sorry to bother you. Do you have any comment on this patch? :-) Thanks, Xiao Yang On 2020/6/17 17:32, Xiao Yang wrote: > From: Xiao Yang > > 1) Simple code and fix the wrong value of stripe_width by _scratch_mkfs_geom(). > 2) Get hugepage size by _get_hugepagesize() and replace fixed 2M with > hugepage size because hugepage size/PMD_SIZE is not 2M on some > arches.(e.g. hugepage size/PMD_SIZE is 512M on arm64) > 3) For debugging, redirect the output of mkfs to $seqres.full. > > Signed-off-by: Xiao Yang > --- > common/rc | 7 +++++++ > tests/generic/413 | 10 ++-------- > tests/xfs/260 | 4 ++-- > 3 files changed, 11 insertions(+), 10 deletions(-) > > diff --git a/common/rc b/common/rc > index bde26010..4852b21b 100644 > --- a/common/rc > +++ b/common/rc > @@ -170,6 +170,13 @@ _get_filesize() > stat -c %s "$1" > } > > +# get hugepagesize in bytes > +_get_hugepagesize() > +{ > + local hugepgsz=$(awk '/Hugepagesize/ {print $2}' /proc/meminfo) > + echo $((hugepgsz * 1024)) > +} > + > _mount() > { > $MOUNT_PROG `_mount_ops_filter $*` > diff --git a/tests/generic/413 b/tests/generic/413 > index 19e1b926..dfe2912b 100755 > --- a/tests/generic/413 > +++ b/tests/generic/413 > @@ -111,14 +111,8 @@ do_tests() > t_mmap_dio_dax $((64 * 1024 * 1024)) > } > > -# make fs 2Mb aligned for PMD fault testing > -mkfs_opts="" > -if [ "$FSTYP" == "ext4" ]; then > - mkfs_opts="-E stride=512,stripe_width=1" > -elif [ "$FSTYP" == "xfs" ]; then > - mkfs_opts="-d su=2m,sw=1" > -fi > -_scratch_mkfs "$mkfs_opts" > /dev/null 2>&1 > +# make fs aligned for PMD fault testing > +_scratch_mkfs_geom $(_get_hugepagesize) 1 >> $seqres.full 2>&1 > > # mount SCRATCH_DEV with dax option, TEST_DEV not > export MOUNT_OPTIONS="" > diff --git a/tests/xfs/260 b/tests/xfs/260 > index fbdc4cd8..7afc20f1 100755 > --- a/tests/xfs/260 > +++ b/tests/xfs/260 > @@ -121,8 +121,8 @@ do_tests() > t_dax_flag_mmap_dio $((64 * 1024 * 1024)) > } > > -# make xfs 2Mb aligned for PMD fault testing > -_scratch_mkfs "-d su=2m,sw=1" > /dev/null 2>&1 > +# make xfs aligned for PMD fault testing > +_scratch_mkfs_geom $(_get_hugepagesize) 1 >> $seqres.full 2>&1 > > # mount with dax option > _scratch_mount "-o dax"