Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp274978rwi; Wed, 2 Nov 2022 11:46:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6wUdbvo8HWzE7zciaw1bgM60Lkov241YRwLtga4FjGXWgrAe4ZXDRZXh+AbJ6iGxVy+InC X-Received: by 2002:a05:6402:2685:b0:462:73aa:c23d with SMTP id w5-20020a056402268500b0046273aac23dmr25541448edd.390.1667414767393; Wed, 02 Nov 2022 11:46:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667414767; cv=none; d=google.com; s=arc-20160816; b=jqopqND1606mXyIG84cM7fIArHaCQJPzuG6OIvVGz8Pt8KFiXT+cjz/rbqIV4pILlF fhB/gq/u/oS84noQ988XUDbzXZ8j/3RH9qXrMHJhmupJeOHfhqkorn96P3YHwNyBfFA4 3TruKoYnazj2wnffVl3ZNsGCRnC3rysT45P7xURsZrjEqTHgUrM/OgNw0hlzHxDMCEl8 CfJSQc53UeQdhNuMUA9A/HdBze3AIRM7eL/jhgG57Q1juRfTNX/a7TxolFeCpBDOznx2 rplDWDqtJJEUvoQcwg8cdqVn8L/LQaFwqCuS0ol8ou1fJRqavkf8IIPbFKpVhlR1TO/8 zjkA== 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; bh=PsRGIw0D9Tnd6NYV0Bz7B8tgwVGO6vygJa7A9atx/ds=; b=DyVkferFltT5cCm3QtwxX2gmEUDCiQhk2i0cf0zAqwTkUZ/GDxR3nqYb3IvR4LFz9+ RXXogXXIpUMW730him3JSdPXvjV6k8MNO5ch19I8IcVtqmjnAg4rtpZKyy4sH/+l8H4e +HuLKVpM0MyoMPXMVSc2Rlii515ox8vvZSJiORvAOKxpzEZdeX6VTVR0vs+UgcG9Mxc1 0v5UhEaRVt2Nyqh3DHiB5BpQz/VGVVCgyWNW78ddN2n2Oxw6YMDlin1fqvXkq+b9srme +PivBLqTGg8YOKwYU+GkVjWJuP+8UHp7fNRrLD/95OH3bLEBo/TOLpALLpTdrt7g82Sb /zVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=re+vVK9n; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 f5-20020a50d545000000b004626d7caf42si13851982edj.270.2022.11.02.11.45.18; Wed, 02 Nov 2022 11:46:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=re+vVK9n; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 S231536AbiKBSo5 (ORCPT + 99 others); Wed, 2 Nov 2022 14:44:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231519AbiKBSo4 (ORCPT ); Wed, 2 Nov 2022 14:44:56 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A28BF2D1C1 for ; Wed, 2 Nov 2022 11:44:55 -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 ams.source.kernel.org (Postfix) with ESMTPS id 55FDBB82432 for ; Wed, 2 Nov 2022 18:44:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC9FEC433C1; Wed, 2 Nov 2022 18:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667414693; bh=86zXV5Pk1MWvTTVvNIm9vQ3coRdQY9tYty1mLmW1O6E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=re+vVK9nFUag54kPIW6q6n/hEzxQ5UR1H9x6U22WByUZTdtMNLJJtk1foUPqWPx5M 7hXCHVWxL6clvp/aQujjPWrDqYrPiYAMsSRAvDxddHfSQPwrezoyMId5mJpRxjfgB2 R+R7ZtKOukh2dQqL+J3Ljw+xXmQwfsc6IQSegFkM/5/kExFHFu5g0mwpCNBD9kihSF ETmjg9aSUmYkcvvVYoihKNV5Np6mMZ6Tgipzjmn7uyX39mLtfXJGqEvP6/etsRaiGq tLmtMoSIXiU5yclkHNvpjWlApuIhPczpOQ3bC+AzmKgMWitKtb9I3hRSOVckQtQgMG jIFiZtbURYY4A== From: Jeff Layton To: chuck.lever@oracle.com Cc: linux-nfs@vger.kernel.org, neilb@suse.de Subject: [PATCH v6 1/4] nfsd: remove the pages_flushed statistic from filecache Date: Wed, 2 Nov 2022 14:44:47 -0400 Message-Id: <20221102184450.130397-2-jlayton@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221102184450.130397-1-jlayton@kernel.org> References: <20221102184450.130397-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.1 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 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-nfs@vger.kernel.org We're counting mapping->nrpages, but not all of those are necessarily dirty. We don't really have a simple way to count just the dirty pages, so just remove this stat since it's not accurate. Signed-off-by: Jeff Layton --- fs/nfsd/filecache.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c index 1b69893c82ab..001593ff23ae 100644 --- a/fs/nfsd/filecache.c +++ b/fs/nfsd/filecache.c @@ -58,7 +58,6 @@ static DEFINE_PER_CPU(unsigned long, nfsd_file_cache_hits); static DEFINE_PER_CPU(unsigned long, nfsd_file_acquisitions); static DEFINE_PER_CPU(unsigned long, nfsd_file_releases); static DEFINE_PER_CPU(unsigned long, nfsd_file_total_age); -static DEFINE_PER_CPU(unsigned long, nfsd_file_pages_flushed); static DEFINE_PER_CPU(unsigned long, nfsd_file_evictions); struct nfsd_fcache_disposal { @@ -396,7 +395,6 @@ nfsd_file_flush(struct nfsd_file *nf) if (!file || !(file->f_mode & FMODE_WRITE)) return; - this_cpu_add(nfsd_file_pages_flushed, file->f_mapping->nrpages); if (vfs_fsync(file, 1) != 0) nfsd_reset_write_verifier(net_generic(nf->nf_net, nfsd_net_id)); } @@ -1023,7 +1021,6 @@ nfsd_file_cache_shutdown(void) per_cpu(nfsd_file_acquisitions, i) = 0; per_cpu(nfsd_file_releases, i) = 0; per_cpu(nfsd_file_total_age, i) = 0; - per_cpu(nfsd_file_pages_flushed, i) = 0; per_cpu(nfsd_file_evictions, i) = 0; } } @@ -1237,7 +1234,7 @@ nfsd_file_create(struct svc_rqst *rqstp, struct svc_fh *fhp, */ int nfsd_file_cache_stats_show(struct seq_file *m, void *v) { - unsigned long releases = 0, pages_flushed = 0, evictions = 0; + unsigned long releases = 0, evictions = 0; unsigned long hits = 0, acquisitions = 0; unsigned int i, count = 0, buckets = 0; unsigned long lru = 0, total_age = 0; @@ -1265,7 +1262,6 @@ int nfsd_file_cache_stats_show(struct seq_file *m, void *v) releases += per_cpu(nfsd_file_releases, i); total_age += per_cpu(nfsd_file_total_age, i); evictions += per_cpu(nfsd_file_evictions, i); - pages_flushed += per_cpu(nfsd_file_pages_flushed, i); } seq_printf(m, "total entries: %u\n", count); @@ -1279,6 +1275,5 @@ int nfsd_file_cache_stats_show(struct seq_file *m, void *v) seq_printf(m, "mean age (ms): %ld\n", total_age / releases); else seq_printf(m, "mean age (ms): -\n"); - seq_printf(m, "pages flushed: %lu\n", pages_flushed); return 0; } -- 2.38.1