From patchwork Fri Nov 3 14:01:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 161312 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1056037vqu; Fri, 3 Nov 2023 07:04:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGtnw4vZog/vwGexu+Ot9Rd5zNRWNWdmH3o2XZHc50Cj0xuejzeLJ9f0ThVgZvtSVEGZFsq X-Received: by 2002:a05:6a20:4c05:b0:171:8e16:ea83 with SMTP id fm5-20020a056a204c0500b001718e16ea83mr17007420pzb.29.1699020278164; Fri, 03 Nov 2023 07:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699020278; cv=none; d=google.com; s=arc-20160816; b=KOKZcqwoHx5jJS6wGydqUTwN61+K3vEiZx0MV9AuQcRUKwdFBachPXeGp5yh3h+21j AV7ZoVLc4iX/D6yuSx++imc2tr0Rs879xu2fUeNLF7dBwiOTTrg2y11c1MSjpC1BeP6W T87UKuxUV7D4W9obUfmAZrMha3Fy4seByt/9LISYyL567g38AbW3O+b7s1CJ+fEq23vk PSGdKMMubt2ala5L4uTLqBET5rxvvJF6H4MsCuf1I4qUYsBcnilnCPxlqCt/YeglDFOz 7yjm7q/aBJ6jEGnqrQILALqjMSgzkjMcxYGAxnB6BCongxuK3InSKlUb2g9jX3RYbpF/ DL4A== 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; bh=81LlqxtowmFJT9OO5iZTzQqQILthz4G91XTOFcyCEIY=; fh=kUj/5waaepfljbNx30rj2BALdV0u/mUCTaFWThlgquQ=; b=uMg+fl72fIYkirgn96y5QpAdatQQeCDG6aFUV9lQQav7Q/JdR7bp/iypzuBLPnE373 qGyuEE8K9RLKq+lMOoJVm1NnVT5TYGXvvATFZnolKueah/kSyGm9JWKkkTlnCAUsB+GX 4wrvS+n1i7qGsRh38+bjKlSb+wvToGTdaRem0aNtUeIjUwg98V/y6qcBLJmJiAFd4Yph V3+y+f3XyahW78y/WoTi7pLXmdzVKB74UBlrOQ84lFurmg8P/5HdEZcsnnQzgk8t2Qdu PX/z3LcekHiGrk3tFS25iOOqceXJpve3bMlRNX/fc1hxT/s7X+Tlj+SPhKvoXHbwLFPr yLBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id y14-20020a656c0e000000b005859e224617si1628683pgu.818.2023.11.03.07.04.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 07:04:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id DBF2482CC426; Fri, 3 Nov 2023 07:04:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377791AbjKCOEM (ORCPT + 36 others); Fri, 3 Nov 2023 10:04:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377781AbjKCOD6 (ORCPT ); Fri, 3 Nov 2023 10:03:58 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F403D49; Fri, 3 Nov 2023 07:03:55 -0700 (PDT) Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SMMpQ1KByz1P7pc; Fri, 3 Nov 2023 22:00:46 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 3 Nov 2023 22:03:48 +0800 From: Kefeng Wang To: Andrew Morton CC: , , Matthew Wilcox , David Hildenbrand , , Kefeng Wang Subject: [PATCH 14/18] mm: remove mm_counter_file() Date: Fri, 3 Nov 2023 22:01:15 +0800 Message-ID: <20231103140119.2306578-15-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231103140119.2306578-1-wangkefeng.wang@huawei.com> References: <20231103140119.2306578-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 03 Nov 2023 07:04:28 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781551887241330591 X-GMAIL-MSGID: 1781551887241330591 Since no one call mm_counter_file(), remove it. Signed-off-by: Kefeng Wang --- include/linux/mm.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index f5f76504b212..9353c5709c45 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2583,6 +2583,7 @@ static inline void dec_mm_counter(struct mm_struct *mm, int member) mm_trace_rss_stat(mm, member); } +/* Optimized variant when folio is already known not to be anon */ static inline int mm_counter_file_folio(struct folio *folio) { if (folio_test_swapbacked(folio)) @@ -2590,12 +2591,6 @@ static inline int mm_counter_file_folio(struct folio *folio) return MM_FILEPAGES; } -/* Optimized variant when page is already known not to be PageAnon */ -static inline int mm_counter_file(struct page *page) -{ - return mm_counter_file_folio(page_folio(page)); -} - static inline int mm_counter_folio(struct folio *folio) { if (folio_test_anon(folio))