Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp526842rwi; Mon, 31 Oct 2022 04:43:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5aSXYFI2/HBE4dhT30dxx6IYmcj8ZkAU/yRyzVmBd1iFmu5dSIjb9KqjFI6kNp+JMtrWsP X-Received: by 2002:a17:907:2d91:b0:78d:8747:71b4 with SMTP id gt17-20020a1709072d9100b0078d874771b4mr12644811ejc.545.1667216583981; Mon, 31 Oct 2022 04:43:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667216583; cv=none; d=google.com; s=arc-20160816; b=AuyeftNOJ/5lkanFSQKZtCR3ezmxB6DaDRUhI07h6TbS00/SrSSg7rQxscCtAqsVMf xsrQ2J2vyFPtF2SuxZu8MIeo3sQZ0zm7H9vWk5++xlvP/dgr3dzvQb8aekXupSnbbHd7 UPxLJv2A2yttC6DfN5fA2mdcX3JuP+GILFFJwLQEehVLd70S0P3f5rzaPk7u+aTsnat8 dnbdjo50IsZB9idvyy2c8CPd/ZRQKp9CuapTpp8lBCNIbXT//PKw4wCNbqydd3ppxRVL SK0HlAqhZjerj+9wV4j606FJWrjX6odj5YXtb//CTm8b5ZHVaP5xpfHIDnhwEWsaO5gj /dhw== 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=0UmQsw70EiKCm245CEvNmUznWEDrpOmLTa2Uylzonus=; b=YEVKymwqk0butcjs96/hybjF3199GnOrR8uJdZdcLYvW1K/7vSr+Bo+dDmPSGf0lpw i8JO41fjK4xqPsNP/8CFNvs4FgD2ntT0COX7uiq7UpuZryXLkYX8i1p53gctRVHVnz/3 Nm38Zk4C9CflnuMApF399CmQVtsDj2LC2aJ+x4HGhtQQjL77JiK3ketWyUQ0xrIpczlC 34vca6M4zmuBEa4p53UgGgWYzLgd08VGv7b3ricrNoECPXHQQijXxVES/xLw82AU3LQI 8gAZup479P8/GVgC0KR5j9TH4OdaKxouDEaiyo6J0V+sl++heA7WIzZCw6hZWc/CodUT Z49Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rXGECDZr; 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 sh12-20020a1709076e8c00b00783de095de7si7424010ejc.847.2022.10.31.04.42.39; Mon, 31 Oct 2022 04:43:03 -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=rXGECDZr; 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 S230056AbiJaLht (ORCPT + 99 others); Mon, 31 Oct 2022 07:37:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbiJaLhr (ORCPT ); Mon, 31 Oct 2022 07:37:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E60A9E0A4 for ; Mon, 31 Oct 2022 04:37:45 -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 82EDA611CA for ; Mon, 31 Oct 2022 11:37:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88FD6C433C1; Mon, 31 Oct 2022 11:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667216264; bh=6/vmMU8doEFSJLe/vqDudikGiZBJYqyJCPG4vhF1EUs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rXGECDZrWb3382w6VAT7z3ocaQ4ZW8aRqXEBOKqvUhh/66XMJZ6eRP55ozKywfFVd zAyW5ye7piiUyTVskGUy+0Dkr1deLbmEwY6H7TWQ2O8qdqsL5bPxtD1NWTpLbNrNwD 2ZHOi/0PoY4t2Tl4dcZUf6jZa2D3w7IUMhGfeLc8/jE4P/Y5fP+EXMe9hucbDYseS2 GBsBOoW3Q6+Vn41sh5FY32uTueHcNo8tnQXLC43mqH0ELVn5xN0g2jXqeFH8NBf/L4 o1b6RyfXBs/+hXpCc3ixCZ6FvJ7eM/XB0xtVbzBelWF5RYAaD992WabBTlJlmqNLAW b28lohFt2UPew== From: Jeff Layton To: chuck.lever@oracle.com Cc: neilb@suse.de, linux-nfs@vger.kernel.org Subject: [PATCH v4 1/5] nfsd: remove the pages_flushed statistic from filecache Date: Mon, 31 Oct 2022 07:37:38 -0400 Message-Id: <20221031113742.26480-2-jlayton@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221031113742.26480-1-jlayton@kernel.org> References: <20221031113742.26480-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 98c6b5f51bc8..f8ebbf7daa18 100644 --- a/fs/nfsd/filecache.c +++ b/fs/nfsd/filecache.c @@ -32,7 +32,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 { @@ -370,7 +369,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)); } @@ -998,7 +996,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; } } @@ -1212,7 +1209,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; @@ -1240,7 +1237,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); @@ -1254,6 +1250,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