Message ID | 20230503080258.14525-5-dwagner@suse.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1153005vqo; Wed, 3 May 2023 01:05:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4L3u2QwwOa3k/JmZwFg+oCeyJwwlHuD6Pne5lcq9e+2XHEpoZqWDsJgAPJaKTy3bWKgX8G X-Received: by 2002:a05:6a20:7da6:b0:f5:5232:4bde with SMTP id v38-20020a056a207da600b000f552324bdemr22231560pzj.23.1683101117515; Wed, 03 May 2023 01:05:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683101117; cv=none; d=google.com; s=arc-20160816; b=B0CE80B8zHy5rObciCdmO4/FcUV3+Jh0+2b0PmPJujKbl39UOl/K6EksDmAHuWUnDl dcPTEJR1JBMqug5VAduO9EETYK0SJjlUnJO1gLtmtx2OxqKs0ZzGDRM5NOPJGJjNzG1q 8L6NCzVBEv3PbCveRCtUOq0LfFtykxX/aF+bxzkBqN93CAHIBMM0iy1/m7Gvbo+EK6Tm +lYyoP0UMpJHQzubu0KrUqIGGaOvSIiCI+cpWaFfAjNiZAgbvwAP+qoVrrM3zfNw5iS4 Gwy1VDpMhACYPo2v2oHQ+cSd7f4Lx72ziO/2cdooDq9YxD2cRzf8jXYUJuW7+uz4UaRE lAdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=blxJG8cSb9nAOdVRY3eSjODYe9Zj/GUTrxASYKRPMLY=; b=CL3hz38QiP3U854OWvTYYbh+FGxZoy333B8gLSNUx3IDEeVD7tEV6ryiK+pTfn497X aZJcGvmh/j3VoBCRx+tENplLdkPvwKgIfpYhkCjJyF7ApLm2FbIvl8VHLwYUri81lNu5 su5AQ2VW8vRFaTCh+Xj+KF0CLOaoLypWSieHqKVWEO62vvb//yxnb2npm5DBJDKRpqGH sKQxkLP0PzsiiHmeu4PepZ2iRU6tR16Bf8CQ9ulie1IxRVeITEvo759+ZeQXRQxS0BCX dfqNYci8hHciSoCQ6uHyY/u9vwObargF9FI+3gRv8srtFcTkz8+VknvMmlWhSvgMDnFn uRsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=bqoL0PAs; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r29-20020a63441d000000b00513c817a392si29461577pga.405.2023.05.03.01.05.03; Wed, 03 May 2023 01:05:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=bqoL0PAs; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229719AbjECIDm (ORCPT <rfc822;heyuhang3455@gmail.com> + 99 others); Wed, 3 May 2023 04:03:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbjECIDO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 3 May 2023 04:03:14 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AB37E74; Wed, 3 May 2023 01:03:13 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 24D9D2233B; Wed, 3 May 2023 08:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1683100992; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=blxJG8cSb9nAOdVRY3eSjODYe9Zj/GUTrxASYKRPMLY=; b=bqoL0PAsnBVoBT+vIpTrr9Jset9nzF3lrBJXsVMbuSoNhTG2zu6/wtaluV7O2LU2DutVGG Z9v54fs4JRFGFQmHGwyaMDvWYnvoTpU5kBfvkFUgS/BKHxPUb6Z0o4PS8oW1YWJFBDe3hx TM2dAwYZQVVesKKsft+iGmk7pS+MWxg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1683100992; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=blxJG8cSb9nAOdVRY3eSjODYe9Zj/GUTrxASYKRPMLY=; b=8KqA9O/ZNgmjUTpiONgED2mK5EzNsj5MZmjAK3nxMQFj4gGQ9Hl/a/HixnskEhFE4P+HAW 63To15r+HFiOQ7BQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1696A1331F; Wed, 3 May 2023 08:03:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8VA0BUAVUmQzYgAAMHmgww (envelope-from <dwagner@suse.de>); Wed, 03 May 2023 08:03:12 +0000 From: Daniel Wagner <dwagner@suse.de> To: linux-nvme@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Chaitanya Kulkarni <kch@nvidia.com>, Shin'ichiro Kawasaki <shinichiro@fastmail.com>, Hannes Reinecke <hare@suse.de>, Daniel Wagner <dwagner@suse.de> Subject: [PATCH blktests v3 04/12] common/xfs: Limit fio size job to fit into xfs fs Date: Wed, 3 May 2023 10:02:50 +0200 Message-Id: <20230503080258.14525-5-dwagner@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230503080258.14525-1-dwagner@suse.de> References: <20230503080258.14525-1-dwagner@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764859437400080374?= X-GMAIL-MSGID: =?utf-8?q?1764859437400080374?= |
Series |
nvme testsuite runtime optimization
|
|
Commit Message
Daniel Wagner
May 3, 2023, 8:02 a.m. UTC
The usable capacity of the filesystem is less than the raw
partition/device size due to the additional meta/log data.
Ensure that the job size for fio is not exceeding the limits.
Because we have hard coded the path where we mount the filesystem
and don't want to expose this, we just update max size inside
_xfs_run_fio_verify_io(). No need to leak this into the caller.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
common/xfs | 3 +++
1 file changed, 3 insertions(+)
Comments
On 5/3/23 01:02, Daniel Wagner wrote: > The usable capacity of the filesystem is less than the raw > partition/device size due to the additional meta/log data. > > Ensure that the job size for fio is not exceeding the limits. > > Because we have hard coded the path where we mount the filesystem > and don't want to expose this, we just update max size inside > _xfs_run_fio_verify_io(). No need to leak this into the caller. > > Signed-off-by: Daniel Wagner <dwagner@suse.de> > --- > common/xfs | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/common/xfs b/common/xfs > index 413c2820ffaf..37ce85878df2 100644 > --- a/common/xfs > +++ b/common/xfs > @@ -37,6 +37,9 @@ _xfs_run_fio_verify_io() { > sz_mb="${avail_mb}" > else > sz_mb="$(convert_to_mb "${sz}")" > + if [[ "${sz_mb}" -gt "${avail_mb}" ]]; then > + sz_mb="${avail_mb}" > + fi > fi > > _run_fio_verify_io --size="${sz_mb}m" --directory="${mount_dir}/" this is exactly how it should to start with, the only is now we are silently reducing the fio job size maybe that is okay ? or we should error out here instead of being smart ? -ck
On Wed, May 03, 2023 at 09:29:04AM +0000, Chaitanya Kulkarni wrote: > On 5/3/23 01:02, Daniel Wagner wrote: > > The usable capacity of the filesystem is less than the raw > > partition/device size due to the additional meta/log data. > > > > Ensure that the job size for fio is not exceeding the limits. > > > > Because we have hard coded the path where we mount the filesystem > > and don't want to expose this, we just update max size inside > > _xfs_run_fio_verify_io(). No need to leak this into the caller. > > > > Signed-off-by: Daniel Wagner <dwagner@suse.de> > > --- > > common/xfs | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/common/xfs b/common/xfs > > index 413c2820ffaf..37ce85878df2 100644 > > --- a/common/xfs > > +++ b/common/xfs > > @@ -37,6 +37,9 @@ _xfs_run_fio_verify_io() { > > sz_mb="${avail_mb}" > > else > > sz_mb="$(convert_to_mb "${sz}")" > > + if [[ "${sz_mb}" -gt "${avail_mb}" ]]; then > > + sz_mb="${avail_mb}" > > + fi > > fi > > > > _run_fio_verify_io --size="${sz_mb}m" --directory="${mount_dir}/" > > > this is exactly how it should to start with, the only > is now we are silently reducing the fio job size maybe that is okay ? > > or we should error out here instead of being smart ? The problem I try to solve here is that on the caller side (nvme/035) we don't know yet the usable filesystem size. We only the size of the nvme_img_size. If we want to move this logic to the caller side we need split _xfs_run_fio_verify_io() into steps. The first step which creates the fileystem and the second one which runs fio. I don't know if this is worth doing it though.
diff --git a/common/xfs b/common/xfs index 413c2820ffaf..37ce85878df2 100644 --- a/common/xfs +++ b/common/xfs @@ -37,6 +37,9 @@ _xfs_run_fio_verify_io() { sz_mb="${avail_mb}" else sz_mb="$(convert_to_mb "${sz}")" + if [[ "${sz_mb}" -gt "${avail_mb}" ]]; then + sz_mb="${avail_mb}" + fi fi _run_fio_verify_io --size="${sz_mb}m" --directory="${mount_dir}/"