From patchwork Wed May 18 01:46:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yu Zhao X-Patchwork-Id: 12853102 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 60DFBC433EF for ; Wed, 18 May 2022 03:07:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:References: Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=2bqoTMawT56SAezR+vS4BQeBW+G8tqDPSCLp6QcwjKs=; b=bPBWl2snIBu+9TxyJ3jewFULMT x7S9qlMTVxBchAI9N8Wjjj8QyB1eIFXo0CfERiHDPdiHeecg89qwcg1qPxfjtw4OiYL26cRxjSQNj 4B1uIz5WK2vD9wJbn7CVprJJAQNphXxTPwWk4BnKmZ4Z5z4nLb22U4WTnGa6AdiVeWf0J/j9Z0Ku6 V1fs8rezzTPUxKjgGmGGUYRxJi/2YqaBnevNZFuTLfM0dzewUZHCTXFBiofY+XbVCxjUJHqCzK6rf Itm1rkEUP+XoEFlJ+0xVhpmFHcl38HsD0XhIRruJkEaxY97NvDqWhyLSzydL3IN2gxFLlGRMocYjv tlkHNsiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrA08-00Gntu-CY; Wed, 18 May 2022 03:05:29 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nr9we-00GmIb-OB for linux-arm-kernel@bombadil.infradead.org; Wed, 18 May 2022 03:01:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :Cc:To:From:Subject:References:Mime-Version:Message-Id:In-Reply-To:Date: Sender:Reply-To:Content-ID:Content-Description; bh=2k47IzMwcCabKXgicn4noPykM2uGLJnBykS7HlFiI8w=; b=nmPn3RAadp+uHxHSiX/hjU6zcg y0q3uGzqRwQdTmNqZqXTviJOQUggeKEDEBy6l8KaeJyvwpSpD0XalpE5s9CUaax+NznrOW31mBmPs 4fH9z3zKTWBLa0tnyXkdjdp13wB10b3M65AJw5Jj6IAFkKbwjFWW0hZC49ZI2ceQDvvmd0GadGZG8 BIJi4X16tFavK2qz2o21FxIgmGfTZNnWLX/63CEQ8Jrmgvq+MpsyXII4OQkDWNe+Tukk24S1ZDlOc WzIoZJ6dtgptNlBcx8Eyr9TuMhacrmumMUoUlveZibqX0UlFPGB5V+CzqFMgxMpVBEEibyZMnzQfo WiHWYUiA==; Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nr8mE-001OvW-Nz for linux-arm-kernel@lists.infradead.org; Wed, 18 May 2022 01:47:04 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id y6-20020a25a086000000b0064d8822f94bso644108ybh.22 for ; Tue, 17 May 2022 18:47:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc:content-transfer-encoding; bh=2k47IzMwcCabKXgicn4noPykM2uGLJnBykS7HlFiI8w=; b=aei3DToBh8ETXlvQnlUeTmPRDPPpHJQq+Tb7kQz3IxXIpTpzsq5AiNIgt96OPzJefp 6ywXqgZpvrjr4352sYucxPL2b6v7FYT8zUV8RzpmGOxTyHPsQwa25kKP4sr+HWx1MXRZ 7zk1VZ+6KuBwT7HiXKqQzsY6TtLni/IPnj2DJC2crApo36Z2G+0ogkkMwSZH4qzMx3Kl ULntFSZZD/SDjcPPnjQfjrgYddGlTlXk277b5lMj6I+m4gKrNvzRcCvZGWtt+cnbaFrF hvqc5aS3Q9mPr6/Abjh2NxZ7IPoxNzL8Em7qV/ep3hOa1cE+mThDls+dmX0zbmVBL0Iw +fXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc:content-transfer-encoding; bh=2k47IzMwcCabKXgicn4noPykM2uGLJnBykS7HlFiI8w=; b=hRfl7od2CLYeddR5KqUu5yJ1RzozqKzcGAaiG1LNJ+hz90p+vaVJS/2CF1Z84oe/Kh r0zyz1ebWVnaKSW/6rYwI1l23BiWNFxZFAXmsA2EPsuzRp/3Mz3JhAu3JEj7if7Y+Or2 rFARnvC9hXOuZVOlXEy/Q/X5toC5Z5pLZHt2lRgHy+V9SndJB3w+K+moA/FBHrFkNZts BjFgQ6FzjhWI8kFPnFX1uO5bVeNUD4f8+Ie9YfeZUyTY5thRypTxDHp3MmGwB/iMhB/8 TRFiJ0Sd8FYbmwinoPTIUoylZoOfxO2zF4gFcZeHReLqbMraMBZJR074xTSHcgVeN5NY 9gRA== X-Gm-Message-State: AOAM530zJ8wHwMVfnnVpTx+aTadMY9iYME35rLKwlpcTCeOdgqPoAb8R RAnaU+xZO7wTB8N+U9gl13QDFSbCo+s= X-Google-Smtp-Source: ABdhPJzqOqzng70YQZkxXWVTmQJQwNaUloJzQSF15E4otE3nKg1B2U9N2NHa1PZDXrxFGBjAXED580jBaMU= X-Received: from yuzhao.bld.corp.google.com ([2620:15c:183:200:f7bc:90c9:d86e:4ea8]) (user=yuzhao job=sendgmr) by 2002:a25:416:0:b0:64d:8829:7fef with SMTP id 22-20020a250416000000b0064d88297fefmr15179083ybe.48.1652838420215; Tue, 17 May 2022 18:47:00 -0700 (PDT) Date: Tue, 17 May 2022 19:46:23 -0600 In-Reply-To: <20220518014632.922072-1-yuzhao@google.com> Message-Id: <20220518014632.922072-5-yuzhao@google.com> Mime-Version: 1.0 References: <20220518014632.922072-1-yuzhao@google.com> X-Mailer: git-send-email 2.36.0.550.gb090851708-goog Subject: [PATCH v11 04/14] Revert "include/linux/mm_inline.h: fold __update_lru_size() into its sole caller" From: Yu Zhao To: Andrew Morton , linux-mm@kvack.org Cc: Andi Kleen , Aneesh Kumar , Catalin Marinas , Dave Hansen , Hillf Danton , Jens Axboe , Johannes Weiner , Jonathan Corbet , Linus Torvalds , Matthew Wilcox , Mel Gorman , Michael Larabel , Michal Hocko , Mike Rapoport , Peter Zijlstra , Tejun Heo , Vlastimil Babka , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, page-reclaim@google.com, Yu Zhao , Miaohe Lin , Brian Geffon , Jan Alexander Steffens , Oleksandr Natalenko , Steven Barrett , Suleiman Souhlal , Daniel Byrne , Donald Carr , " =?utf-8?q?Holger_Hoffst=C3=A4tte?= " , Konstantin Kharlamov , Shuang Zhai , Sofia Trinh , Vaibhav Jain X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220518_024703_125267_A5A35C48 X-CRM114-Status: GOOD ( 10.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch undoes the following refactor: commit 289ccba18af4 ("include/linux/mm_inline.h: fold __update_lru_size() into its sole caller") The upcoming changes to include/linux/mm_inline.h will reuse __update_lru_size(). Signed-off-by: Yu Zhao Reviewed-by: Miaohe Lin Acked-by: Brian Geffon Acked-by: Jan Alexander Steffens (heftig) Acked-by: Oleksandr Natalenko Acked-by: Steven Barrett Acked-by: Suleiman Souhlal Tested-by: Daniel Byrne Tested-by: Donald Carr Tested-by: Holger Hoffstätte Tested-by: Konstantin Kharlamov Tested-by: Shuang Zhai Tested-by: Sofia Trinh Tested-by: Vaibhav Jain --- include/linux/mm_inline.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index ac32125745ab..7c9c2157e9a8 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h @@ -32,7 +32,7 @@ static inline int page_is_file_lru(struct page *page) return folio_is_file_lru(page_folio(page)); } -static __always_inline void update_lru_size(struct lruvec *lruvec, +static __always_inline void __update_lru_size(struct lruvec *lruvec, enum lru_list lru, enum zone_type zid, long nr_pages) { @@ -41,6 +41,13 @@ static __always_inline void update_lru_size(struct lruvec *lruvec, __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages); __mod_zone_page_state(&pgdat->node_zones[zid], NR_ZONE_LRU_BASE + lru, nr_pages); +} + +static __always_inline void update_lru_size(struct lruvec *lruvec, + enum lru_list lru, enum zone_type zid, + int nr_pages) +{ + __update_lru_size(lruvec, lru, zid, nr_pages); #ifdef CONFIG_MEMCG mem_cgroup_update_lru_size(lruvec, lru, zid, nr_pages); #endif