From patchwork Thu Jan 20 13:10:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alexs@kernel.org X-Patchwork-Id: 12718616 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 24655C433FE for ; Thu, 20 Jan 2022 13:11:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9FE8C6B009F; Thu, 20 Jan 2022 08:11:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9E3876B00A1; Thu, 20 Jan 2022 08:11:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 881546B00A0; Thu, 20 Jan 2022 08:11:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0069.hostedemail.com [216.40.44.69]) by kanga.kvack.org (Postfix) with ESMTP id 7A4D96B009E for ; Thu, 20 Jan 2022 08:11:06 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3EBA78EBFC for ; Thu, 20 Jan 2022 13:11:06 +0000 (UTC) X-FDA: 79050700932.19.F638D1B Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf15.hostedemail.com (Postfix) with ESMTP id D2DD5A0016 for ; Thu, 20 Jan 2022 13:11:05 +0000 (UTC) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 2887D6176C; Thu, 20 Jan 2022 13:11:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 430E3C340E2; Thu, 20 Jan 2022 13:11:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642684265; bh=5gRZ+S+6LIfd4teIFYxNtsVZfUSw171Ca0JEDrDLF/4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mlw3GAC5koWopaGm68URxXemQh8HaLQ0Zmq2CDL1a9nuYPXys51YP+o6rphTReBWc FVs0E0OcDxx6mPeYGbOwoi/HKnvTuZPqk7Pyer66k7x3NyKGIfWzhZlchcJG5xf2al LZy2u4vjzz5wp+8QyTslZHS1gDEUdXryQxSQcfNEkvoHrpAULEoAt3tEhIMvn7YG19 M53SChm2cVYrTY1uG4/6ruUKvMZmegnfRiafGg8vnLP2yILI66V/lxuRGqqsOVvvmC aaevXnSJpk1kiDzpBuOQ77V6Zpe3fjndW7Mdc6IkjQqpIwAcj40iXBW6LJbzTtFTPk n+xBwaR9l6nLw== From: alexs@kernel.org To: Andrew Morton Cc: Alex Shi , Steven Rostedt , Ingo Molnar , Naoya Horiguchi , Yu Zhao , Arnd Bergmann , Vlastimil Babka , Mel Gorman , Johannes Weiner , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 4/5] mm: remove add_page_to_lru_list_tail() Date: Thu, 20 Jan 2022 21:10:23 +0800 Message-Id: <20220120131024.502877-5-alexs@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220120131024.502877-1-alexs@kernel.org> References: <20220120131024.502877-1-alexs@kernel.org> MIME-Version: 1.0 Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Mlw3GAC5; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of alexs@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=alexs@kernel.org X-Stat-Signature: y8utfcywb4r88kws8pxwnb7czf8kr1co X-Rspamd-Queue-Id: D2DD5A0016 X-Rspamd-Server: rspam12 X-HE-Tag: 1642684265-311113 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: From: Alex Shi The function could be fully replaced by lruvec_add_folio_tail, no reason to keep a duplicate one. Signed-off-by: Alex Shi Cc: Andrew Morton Cc: Yu Zhao Cc: Alex Shi Cc: Vlastimil Babka Cc: Arnd Bergmann Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.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); }