Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1276077pxb; Fri, 21 Jan 2022 14:06:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGxsv8wp9HmchklS7N30PavdMiZMKU2CYLClVh3sSLEgzQ5P++G0dWDpqgddopgf0+HfiC X-Received: by 2002:a05:6a00:1595:b0:4c2:7c7c:f3df with SMTP id u21-20020a056a00159500b004c27c7cf3dfmr5451015pfk.71.1642802815480; Fri, 21 Jan 2022 14:06:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642802815; cv=none; d=google.com; s=arc-20160816; b=UJK2s6oYYSnkY0IfUTa4omowHn3m+O5ZCiKdM2utFLc/kqr+jGsG3pxlzkB+p3928N Yqs7wNp1MkwTbPbCI7fuUao7OWnwc62zKalqb6bs50xlsR4kE2b9k8vZsIEJaClQdEM3 kfDVnNHlAMFk/tNqeUNN/dAiqlo8Yl4eLlj+GUHYdQF5Rv0tfBEJy7wXSisG1Ho1yfUS GW5XSIOtnXi7LOjbVpSvjaKFsQe0JBEOYaDX3RicdNB+DwrPv8YZxh8s982bTaszDdTB zQfgSAiOywLyuQq9alqUAMM62+mbGaIOGTyMYbWBIx0l8zilm4pT4AwfquIucqegdqSa wB9A== 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 :dkim-signature; bh=3j13zW/ucMG6/1VURCV7RU20behgbPY4i7HawfUUXdY=; b=Ip3jl7oPK7RM7JaYv6S/E1aDvZV7tKUSNg2y3OwxQQLjS6TZNPjZqSvDmHAEZlb2LH +Ync0SSgz7CZXZe8Aw+q9g2YdekHrTm9+ImgV2BML+l0Dw5nY9sEX0G0ku8mhKq+ek5J BPFo2w9L906/qb1ZtvWC5rVwkabcP7BCwmb/wWRjKtT9dE12MjUz2Pqv1VsBoIJL1s/q Z3V9ZeHnx8pFn1WAgS4KNkkcSoD15KSAXPgYbLQhP+igdr7fno+PeHRo3auiyGKrLaSU AjaF2wuUL7jpSrJ93mvJj6VS188DstwmRhd/rCEc44fDlddZD8dbJoC/ZwLa60WTYZip B55Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Mlw3GAC5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q6si7276522pgp.405.2022.01.21.14.06.44; Fri, 21 Jan 2022 14:06:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Mlw3GAC5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359715AbiATNLJ (ORCPT + 99 others); Thu, 20 Jan 2022 08:11:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359721AbiATNLG (ORCPT ); Thu, 20 Jan 2022 08:11:06 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED8C9C061401 for ; Thu, 20 Jan 2022 05:11:05 -0800 (PST) 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 8C1D261755 for ; 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); } -- 2.25.1