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: 13444570 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 232B1C001DD for ; Fri, 3 Nov 2023 14:04:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0DCF8280025; Fri, 3 Nov 2023 10:04:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0632A280021; Fri, 3 Nov 2023 10:04:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E47A5280025; Fri, 3 Nov 2023 10:04:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id C613E280021 for ; Fri, 3 Nov 2023 10:04:05 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6EB6F1401C2 for ; Fri, 3 Nov 2023 14:04:05 +0000 (UTC) X-FDA: 81416812050.09.DD0CEA3 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf07.hostedemail.com (Postfix) with ESMTP id 8600D40014 for ; Fri, 3 Nov 2023 14:04:02 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf07.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699020243; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=81LlqxtowmFJT9OO5iZTzQqQILthz4G91XTOFcyCEIY=; b=HyFEj2YMCFyCzTHD0a2yA4WlRwctitR1T6Tya2M8I5DAXhjRnBUrkWekGxUCibmOU3m+Oe uf2E3vF4vEnvm+6nYUPrBC4ei1fPeLtokz2jl/NWL2YZrJbdG+tkWszQOqi6qu4dcn1Ju7 DD1NOHNfWi4AsRH7WVPxM3hA2Mln2nA= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf07.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699020243; a=rsa-sha256; cv=none; b=Q1vLr6BJrpHzoleY8I2a13hP6VqRCTacWTNkS9ObJA7HHWxjTudG8LGDKnzrA9kV3B5kEM 3RvGRFkniRmUXQk4eHZwDuiuy9lv5BauVob2LpL6qymdOF6hW/x9jcXyHMaKBE/2/gAmhj YJzZhxTG9Rl/LJfxIhqwILp6EazhkTQ= 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-Rspam-User: X-Stat-Signature: 1oend5apjjht31x8c7towtup996b7r8h X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 8600D40014 X-HE-Tag: 1699020242-373326 X-HE-Meta: U2FsdGVkX1+kOIg3CMdhIOOz0ya6xlZHKPQ2v5na2yseKEQcLEXlGasp98AxMwpKtYYrVoq/3ifLWhZ55TpVJ5c1hYv5tQTiWGhlKDimHphPi1lAx2QVdWnEkgydTqvlLzFLOslYZgYaESIYX0aZaSYDxK6v89mcmoXwdBgixkyGoASoYRhkqgR8MEQqK1g0p2BfGpfydEhQBtDLxd3g1XHsOO33uucP5puoTuIayacTgL1lU96qRNtHEuY+GrnNixoiW3Qe8QFERu3I48ne2GEFf9ZUsbgcC/e63SEbriEdsa5Rqcxpc98hxn5kJcPeB0tVVKle97KUMLiu2PzGJtWOWKoJppcEkzjUA0b7xYyk3t4yYOwQvozh04qjejzxLIz+YAyks/cJR20G5/lCNeB/Lv1JEtwpOyavm/6LvibH8K9gvaYifMT3C2KWbVdqELhat5NC9qSXnNIxME1PZU1rFIK2cq3qZoHkwCg4uuoM93TvE++IyFSzypeq8RSP9WIn3zgKfM2jSVA3dtBde+C6SbVv9fl0ixXps+cdOvhlVetWB9wiJXcLBej/h4Oe4a1mIq0Yhd1fSWYQiKqABy0nCs06QiMObudYVEfu8ZMZgyt3MKg2ZqS1HJiXcM4wJSYD0fDS64FpOdMJudcDTVZFsCdCTd0sWgS2w36qmNv0VHoGE9MYFQrrUiHmfq3pdmP3P447kF0lD+0JGH7ryKGw4A979zTFOUJ1x8lnClSd9a+jX7VW1ydViUYOmp1WwvMbG2JXEGe4yfkAY7lg2AfCaQ8F9Q39/M1x/KAoA+5YlL4WHraDETNJ0m3hHNm0G6DovvioFcASA2lg8LFXeTh4C2QGdZfW9QQkk5aPx+sVdriJbvdz3sJE0G0K5rORcr5wKQVGiIHjCkVY1xcgFH3r6qQ+0nGy7dod/YdKvYLTbIi1jwBG97GjMHSVVuE+JdhSFZ00MMl9lC4YI9X WaTi8ROZ Ci066P4RMAiCi9o6m8lRlhbWWgTB4IHD0m5O0aidUZ2ckHZOzCMVT38lgy+G4ndG7EBOK2NDwmnnN1ZY/bjNPglapduSVhf/Kl3SESgDs3mi5vf9rQYmpqUZUl+jMvdDchQB2NJvCEQZeWTLIc34QIXGcOYFe8QbOi6rYMkoKDW37BiGM+d3Z5SQX5vghvpE5U+T9 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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))