[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220120131024.502877-5-alexs@kernel.org>
Date: Thu, 20 Jan 2022 21:10:23 +0800
From: alexs@...nel.org
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Alex Shi <alexs@...nel.org>, Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>,
Naoya Horiguchi <naoya.horiguchi@....com>,
Yu Zhao <yuzhao@...gle.com>, Arnd Bergmann <arnd@...db.de>,
Vlastimil Babka <vbabka@...e.cz>,
Mel Gorman <mgorman@...hsingularity.net>,
Johannes Weiner <hannes@...xchg.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: [PATCH 4/5] mm: remove add_page_to_lru_list_tail()
From: Alex Shi <alexs@...nel.org>
The function could be fully replaced by lruvec_add_folio_tail, no reason
to keep a duplicate one.
Signed-off-by: Alex Shi <alexs@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Yu Zhao <yuzhao@...gle.com>
Cc: Alex Shi <alexs@...nel.org>
Cc: Vlastimil Babka <vbabka@...e.cz>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: linux-kernel@...r.kernel.org
Cc: linux-mm@...ck.org
---
include/linux/mm_inline.h | 6 ------
mm/swap.c | 2 +-
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index 7d7abd5ff73f..4df5b39cc97b 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -102,12 +102,6 @@ void lruvec_add_folio_tail(struct lruvec *lruvec, struct folio *folio)
list_add_tail(&folio->lru, &lruvec->lists[lru]);
}
-static __always_inline void add_page_to_lru_list_tail(struct page *page,
- struct lruvec *lruvec)
-{
- lruvec_add_folio_tail(lruvec, page_folio(page));
-}
-
static __always_inline
void lruvec_del_folio(struct lruvec *lruvec, struct folio *folio)
{
diff --git a/mm/swap.c b/mm/swap.c
index fb101a06dce4..23c0afb76be6 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -550,7 +550,7 @@ static void lru_deactivate_file_fn(struct page *page, struct lruvec *lruvec)
* The page's writeback ends up during pagevec
* We move that page into tail of inactive.
*/
- add_page_to_lru_list_tail(page, lruvec);
+ lruvec_add_folio_tail(lruvec, page_folio(page));
__count_vm_events(PGROTATED, nr_pages);
}
--
2.25.1
Powered by blists - more mailing lists