From patchwork Mon Jun 19 11:07:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13284331 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 3EF61EB64DA for ; Mon, 19 Jun 2023 10:52:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ADA408D0002; Mon, 19 Jun 2023 06:52:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A8AD88D0001; Mon, 19 Jun 2023 06:52:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 979608D0002; Mon, 19 Jun 2023 06:52:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 8487F8D0001 for ; Mon, 19 Jun 2023 06:52:53 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 42569C0733 for ; Mon, 19 Jun 2023 10:52:53 +0000 (UTC) X-FDA: 80919184626.15.959A7EB Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf28.hostedemail.com (Postfix) with ESMTP id 48685C0016 for ; Mon, 19 Jun 2023 10:52:49 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf28.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 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=1687171971; 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=kSeVltLVwL4S4NL52guaL9XBMWx3z7eLOSLgWslw1ZM=; b=IgS8q5F8TkYkJbG7NXGqPtSe4wGGX36MPCiKRn0doHkyvrGXUp2FXwwv69gBhYt1SpH31T AVeqDgy8SXnkZAqvekQWC7DEoZiHtHryGxGHGfB09e6YaTp/DxBeZczmHFGpbDKW/0KfgG JTAdFHdJht4Jz88Ekojut4ICzXFJJGQ= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf28.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687171971; a=rsa-sha256; cv=none; b=BPDI2DW+CEPc8De2U42lSaBqekixlQaS2cQjQnk7rQHu4kxMtSj2fzEwakfZvI5vOVbJg/ JSZGl580r8nyt2hzJoiqLLM1vHedjFbbIbQK51JtY0FlKz0u6GQefiOmqlPoAd+KrGrU11 ap1QDuU6FH4HAvnpVcWzpJqP97uIucY= Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Ql6364fZ0zMp0X; Mon, 19 Jun 2023 18:49:38 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 19 Jun 2023 18:52:45 +0800 From: Kefeng Wang To: CC: , , , , , Kefeng Wang Subject: [PATCH -next v2 2/2] mm: kill [add|del]_page_to_lru_list() Date: Mon, 19 Jun 2023 19:07:18 +0800 Message-ID: <20230619110718.65679-2-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230619110718.65679-1-wangkefeng.wang@huawei.com> References: <20230619110718.65679-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 48685C0016 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: mr1jt69gagg3quoprodb1bzrhi9kibgk X-HE-Tag: 1687171969-775437 X-HE-Meta: U2FsdGVkX1+OgKwNv8s3YMbUoiM6yeiKsR3fwsdaTbdbC+zawWdtxdAEE1+9H4lnXmeQS3UNcSM2qYoyBm4qu6XK8LlDLEoLVOXpI1NV5MeVBg1EJ9Gw9jiQd4EuhxcbgLZtsAs7lVnNPiWmgAxtHS+6PmHrBRunFiW7SfjsgJ3DWKqC9IMQ/0tGoZacnJhWJWQt3kMeXy58uBHB0KFOtFwjN/rrHzC/0Gv5/yYxp+t7/HVeVtQZ23Xu7TATl6UPxFcgg5II/ZtUQyY5HppizRf3zrIsDVOXFk8GVrXRdnxeO+820fn7KhC8s5yy5k4QeGRwkhwP8fwna3DSQ3cy+1eDk4d4fltEN//LnvetaeklG1/KSGh22g/gQQiIm1pA7KPGF32w5EVYP9ybkGFLrA4TqylSE1tPCpk/xwH5C8gazqyYXDrPxpRJgX7aGfBzgVVFrdiMXXUgd/J9fPwopqzHrU4XuR4AQ2dgZZrzfgoUfd/QnOBp9YIBGWTZkQ4v4Meh1xi3onghJnlzm8o3zXyciQKa6Z4Ej+b4JlMLkZ6YmVvm2VK2Qj9ZAGFA0+Alcg3wIdZpl2IVURp3zOKULaNznZVfiIt3EUlaguLvbs9FCl5KYfuFgcEKbP7XObye91MKbcdzU2ZWrtagHu28St38/nqZAlgUoQz0M6BiaiSbwjr6JxydgzkJitX1olPeRddTusLhdvOsxdDLR1sB2hEADr+LcDpTrEAj6/+1hnA/fu3SmNuXug6KSRsikRZnzE333aJ2rNsERmQpCnZDmWMAXLZfFkjuEuGzxZOoP5+4p5TUwlabJyt+DRhHj2qhnpGZNfFbFyGxFpaVh6PjdMYWG0heuWYgwiwwbKwLTmQ+nnxg3zu5BPV0N03rZnsey2NysKYiX6pL4233ug2zAJVRWkG+aEsR1h9eCYgBED7V/urgPhsPwuAPNxxebmfdSQgfPlfcaISmt2K2xrf 6i/Bpg4U fTbzASw0AmbxOBQ3VzWWFpdYmw00GSlTQjaXATB17VflmONGH3510FzaUIXKLIOW/q8VpiCgOWf2+b2s+7CW1zVLICslnDxK/EQyEsT0ZhZkJ3pTF5/n4Em7khf+QlYrVDAj2IYUOt+5tW9w+yLYPl6OCn22vXcUqhgJW8n3nC0zbul8pRBamBbczDvTKOBz1aX7pqmXnTKOvfi+yAw9rrLtljQ== 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: Now no one call [add|del]_page_to_lru_list(), let's drop unused page interfaces. Acked-by: Yu Zhao Signed-off-by: Kefeng Wang --- v2: add ACK include/linux/mm_inline.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index 08c2bcefcb2b..21d6c72bcc71 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h @@ -323,12 +323,6 @@ void lruvec_add_folio(struct lruvec *lruvec, struct folio *folio) list_add(&folio->lru, &lruvec->lists[lru]); } -static __always_inline void add_page_to_lru_list(struct page *page, - struct lruvec *lruvec) -{ - lruvec_add_folio(lruvec, page_folio(page)); -} - static __always_inline void lruvec_add_folio_tail(struct lruvec *lruvec, struct folio *folio) { @@ -357,12 +351,6 @@ void lruvec_del_folio(struct lruvec *lruvec, struct folio *folio) -folio_nr_pages(folio)); } -static __always_inline void del_page_from_lru_list(struct page *page, - struct lruvec *lruvec) -{ - lruvec_del_folio(lruvec, page_folio(page)); -} - #ifdef CONFIG_ANON_VMA_NAME /* * mmap_lock should be read-locked when calling anon_vma_name(). Caller should