Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5362937iog; Wed, 22 Jun 2022 18:29:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1viDrlgVfuMi4mUjbE78tLCiF2/tli3MSx0spMPuvzpSPPHWNv3bIbUuqbQBgLVc3yvNe/P X-Received: by 2002:a05:6402:3606:b0:435:7f24:cf14 with SMTP id el6-20020a056402360600b004357f24cf14mr7373862edb.220.1655947759200; Wed, 22 Jun 2022 18:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655947759; cv=none; d=google.com; s=arc-20160816; b=K3B4L/i+CmDhdNFsiWUwf96oTGg8/4HxzXtvepSfKJ8Z5zuJByikIA2X5eTJzCqjZE g9GYN0ru5DCar+5nOhTQCNvMwUVgiUN9hcCezOwR/XgWmOHNog7/Qbm730J8k3h/b2fe 9YdGKE1WDuh6LYVKXwfA5rwkBpDqioStdHO//Y8PFprcs9eqghVpdt8CMB+MM9gaOk0Y j9ZTxR0DkBQKoykCf4VKRvFu/FE/4aOGCoEK9ySJ2b5zzgUnCNHMCenfBUhHXkMmjcLG ZrQTQhTmGGO5CwOm3ivkG6pzPDMWHhIAUC+8reWF9xfEG1LvTSrmaOVoKU9AiIcxMrlk ersg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=H5b+4cwiReJN+gcTN/5TRy3UtKeRQJzWHjy1+oqMvvk=; b=qRO33qpVRWyPIm7eWzZqSxQADYA95teRFUl0xQH5H1moS2bGGmgtJDXQDpk92uZ6ka Mqf9/92mVKfaEtCD6Tvi+OVq5mZ3Uq4Oe9icEd8Mr9VW08BoIv3um38wAhCbtp+bSklQ 7lRQTo8AYNDRna9KZI0nQ0qyPhN4jGWP/eqd7nHbeIinSlKvq8QN0Ru8XkT/bil7xPly snYzBE1tBKeUKBTpuvu2hfGC/wuPGfbH4DGbAXDcn5m/ewIojNYiqVeCRwJmXHBZ8B5t T+uw0jA5WDF7e++vBcuoqPe+Ki6uqf0Xu2cxcvi5OAWhSRgFo5JGpDiAOpRMpV1HZ5yF v3UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VTekgcxC; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o1-20020a056402438100b004316c7b0c79si30093774edc.18.2022.06.22.18.28.54; Wed, 22 Jun 2022 18:29:19 -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=@kernel.org header.s=k20201202 header.b=VTekgcxC; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235560AbiFWBPm (ORCPT + 99 others); Wed, 22 Jun 2022 21:15:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235423AbiFWBPj (ORCPT ); Wed, 22 Jun 2022 21:15:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC2C442A05; Wed, 22 Jun 2022 18:15:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 881DC61C17; Thu, 23 Jun 2022 01:15:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E03F4C34114; Thu, 23 Jun 2022 01:15:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655946937; bh=xqcTL/3jppseog32Q/cRYr4hD4nyTzEcHPyEaxWsfws=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VTekgcxCVKrsc4qj00SGAisdR2dSQReWHffNPc1KQQ7GBWCEghLaY0477f7kTfhgy Uy5f97iPZjBj6krAoV5zHx9maKa4NnTlRiGeuN3e2xxCZiKkECiFVAaIXqIklGae2y C1jL4JPY/ShldmiQT64nGGq3f6WKEUFCauc/3yUFUNDp6ee7qVMB0zBFQ+uPMwP7RN tpBdeAUYo50BeKWquBdipibso009OAtsKe0ucHJmwg2OJj2DjIH9pkxTUHxfgp2FrF mKDqMIgdINbEPwd4wIs+FylrW55a4asIYX/jmvGz4HE06Jlm1pj2t9n2kH1l8Z0LFA 0GYbuHYtxiSzQ== Date: Wed, 22 Jun 2022 18:15:37 -0700 From: "Darrick J. Wong" To: Stephen Zhang Cc: dchinner@redhat.com, zhangshida , linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org Subject: Re: [PATCH v3] xfs: add check before calling xfs_mod_fdblocks Message-ID: References: <20220621084238.1235880-1-zhangshida@kylinos.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 22, 2022 at 01:57:31PM +0800, Stephen Zhang wrote: > > I understand that calling __xfs_ag_resv_init on an AG with a maximally > > sized data structure can result in @hidden_space being zero here, but > > why does that matter enough to change the code? Are you experiencing > > problems when this happens? Unnecessary slowdowns at mount time? > > Something else? > > > > This is v3 of a patch and I still can't tell why I should care ...? > > After applying this patch, we can avoid to call xfs_mod_fdblocks when > delta equals 0. So we can reduce unnecessary operations here. Yeah, I get that, but what is the real world impact of those unnecessary operations? Have you run fstests to make sure this change doesn't trip over some weird subtlety in the code? Do the anticipated benefits justify diverting my time to figuring out if we've really covered all the corner cases? IOWS: don't waste our time on theoretical improvements. There are /plenty/ of things in 5.19 that need real attention, like generic/522 corrupting things and recoveryloop tests that trip over log recovery. --D