Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2859119rwi; Fri, 28 Oct 2022 12:13:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6+6Bd2snSCk0R7MPe9H53fzybRup2RrSF9TeC+tPBTnoJCQRcvnB1wQbm3C2ku7Ggx4fjy X-Received: by 2002:a17:907:160c:b0:78d:b6f5:9f56 with SMTP id hb12-20020a170907160c00b0078db6f59f56mr767323ejc.325.1666984428899; Fri, 28 Oct 2022 12:13:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666984428; cv=none; d=google.com; s=arc-20160816; b=E/ol1vrrPszkITzJJBBiffEZR4Rttzohpzqk09Wjx1BhBoiTGzcpF/J7iyP2QvF+qA sPXMDRqOiA/qIBnn8lJ6gs/AS3FVLTU+R3nLBRuXw/YfU+HS0UcOgLPP9sSGlORB877s Dw1i/KenVRTET06QSBoyStGQeZaHaHbeY5KpPYiEPAjK9J+btoSjUIt9cHlYtsfA/VFs v3ySSARltm7ksMQghDJZwdFVrzL/r9kTLVz1vHq1J0Vnc9j0graht6oT2OBCRlDbXHzh vVZt+dF8TqblfOHJ8Zt5QfJJTBnULizFOz1qBJmObIXDPScfcHAZJeOJdlxqi9jzqV5c Kv4g== 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=NJ1ZMzewUbt9o29efgCNDNZ/uOK89XyIBZPw1QfoVJY=; b=ketjMUmjGFB4vHJUUFAE97qHHGPbR+jhLSOOe+/V+ycl1AN2KiFfGiWJvDQS50oFdX HS3JC+ernz0gS3+7fnupajC6x6Mf7nClnXlRVOgH2MID1VvnFqa5G0v7gNZw5yCbNNJ6 mQFzretfA1fRdnHYBsgN8N/vxZZyI1hT/isDhU+w5ieFVh5oHb2rmkyZ9zAD04DlXHS7 x41hmecms1wA+cFiQNALMg0j44rgAuI0AcnSo3Xxqxo1fBIU3CFojX1GZFsDeIRKVkCg R6AJVCUSmMVMiX85y83eKqCXScjpRsFP8IS0TjVgiKzqSgkwm5HpEztce7ThCP3K+faT mo5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Q7ZHwZ6v; 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 q6-20020a056402518600b0045d050f0fa3si6330235edd.565.2022.10.28.12.13.24; Fri, 28 Oct 2022 12:13:48 -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=Q7ZHwZ6v; 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 S229455AbiJ1S5T (ORCPT + 99 others); Fri, 28 Oct 2022 14:57:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229935AbiJ1S5S (ORCPT ); Fri, 28 Oct 2022 14:57:18 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 036971ABA3B for ; Fri, 28 Oct 2022 11:57:18 -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 AA2F1B82C8D for ; Fri, 28 Oct 2022 18:57:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2683C433D7; Fri, 28 Oct 2022 18:57:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666983435; bh=19GN2WutVnfU1eKRekedqCHUhQm55dxuykeR22OypyA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q7ZHwZ6vvqlN4G1gKYgYg30XUSdqdy/+WKE7bP2yBOEVDdZECUhubFZpPlkUzYod+ dJThnW6amsBmLxOLDxhofqSti2lFIi9pbx2A8lDDcLw6uPOHCsvKpnW8tGEZBPb/xY ptQyxb8tTMuJUqQqBItMcsDSD5TrUmvMhwruVU/1LJgRWYiZZsJ9r4acJy183QssWX qNININq0Lad4fipuoM/1PJoejfRGB8V/HFL1e2MjqCDcZR7rPBKAXDnHPuiIxriDMs ixEF73CEy1kNCNmvhmYTswByx5hYbptKwWvWG9ZxMCMlQEDfEb2fpZuzZZu2/oD07R xF9sk6Lk1eGAA== From: Jeff Layton To: chuck.lever@oracle.com Cc: linux-nfs@vger.kernel.org, neilb@suse.de Subject: [PATCH v3 1/4] nfsd: remove the pages_flushed statistic from filecache Date: Fri, 28 Oct 2022 14:57:09 -0400 Message-Id: <20221028185712.79863-2-jlayton@kernel.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221028185712.79863-1-jlayton@kernel.org> References: <20221028185712.79863-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 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.37.3