From patchwork Tue Mar 8 23:47:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yu Zhao X-Patchwork-Id: 12774497 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 A9DB0C433EF for ; Tue, 8 Mar 2022 23:50:52 +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=hZ3MT5HGJGf60LSTod864BDVhZ49EzRO5926jLkaOs4=; b=YpEH1D3ZiayECdGtCuaQuWPH/u qJnDyDK4TnCiAVIkMJZoKncUAaPuRel3sk2X8Wvpor4jO9zJegZ8JIT8JKKzcONov2/rqHRGD5YqI dzvDS5V4TjF4Yz3dEXZVLovutZo3au820PddJlJ9+X2uE5HXyfX7/0xnp1ngwRXeNdmNj/DUyQ0xo 3NrAKfRegCw4bIzrO8AEKKU5VJqFqsV2TgYLffwVF3rbrzTB4VzSAIgzJRORsdpIZqaM88TJN36un ub97nsfAwY+pSCWlDOkR7WfxaG4DDKuCxiFeQnQaLzxriZVvc6/jg22i07TjiHm4zpyj6h/2vjXhe ZEYBqjWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRja8-006aiA-Et; Tue, 08 Mar 2022 23:49:32 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRjZ9-006aJu-7d for linux-arm-kernel@lists.infradead.org; Tue, 08 Mar 2022 23:48:33 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id i62-20020a25d141000000b0062896a69ed2so441795ybg.3 for ; Tue, 08 Mar 2022 15:48:30 -0800 (PST) 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=Yy5tsDcd68WP2pPFOldj5ImTljRQrxxQbB0W/VdFifI=; b=b5lAjQE8r1DEbBPedd60rKa6+76988i0gaD01NKhWSvAbggK5fAUfUjLdDSqtCvhi9 pSdAuIJUfsWqSY+yKR3opn1rWFJFPyd6uw0EZTOi89mg3w+9Kij3hZgzSNzQ5uXTIO8Y HaMdUR+NTV2+ofLu655yGEGiMMsv0+/LtxcARukANmdSz0BAgX6igRbXlyWUhH6ywAsw zycuNFFrPjtLG6b4DYVMH54gLp/6K2firQt4JHBz5JuUND1ASXZYseK7OsOP1xFz/xkY WH6L9ooZaCWmADf90u5JzOTRFfZi//lfdLr4wAbqfl+F9F2vsAjm0w5yazXQEOjFRlkI 3Kjw== 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=Yy5tsDcd68WP2pPFOldj5ImTljRQrxxQbB0W/VdFifI=; b=os8WwMdiOZ494aWXuIkoKajqSmJ2N13Imx+6+o4BQp9E5D1dQXGvRV27phQD1ObbTO 6VwdugPyDyp5twOk95YrpvBwbSp/AgNTIQoKT9ywE2+HKPRknZN+ImzdTAn5+42pD2Fb 8JS5pImP4Xtc9+dDRXpNnjivg5rH95z4q8srOOugsI42NZFsmWVX4JCH0DCYeL4kqyKo 2bVEbyxi3M7yeO/3fDXIoxseIjTHqpLWrQPBUwJpiEMjliJvfuK1iZzuG+gUB2+9W/2e 1WgfwKPe3oqg1u1vY6SN3Ah4BNTx0ZFmJ4muxanME+FFOYYBgrMiqPG+StDCIDkilYwR Erjw== X-Gm-Message-State: AOAM531QpIQraxbPnyUH3GM5mtRP4RiRtCwJ6VJJBfTk3Lz2Q/fKfkKp rRWHxM9oojRbTalHSr+dr1daJRHxUnc= X-Google-Smtp-Source: ABdhPJzVnM44uuYLVqWxi2C6HusyvMeenfA/ZcHczyWerbLbS/aJiKNUW4mZoiizV40TQ7wKAK96owR34vA= X-Received: from yuzhao.bld.corp.google.com ([2620:15c:183:200:57a6:54a6:aad1:c0a8]) (user=yuzhao job=sendgmr) by 2002:a25:dfcd:0:b0:628:d031:e3a7 with SMTP id w196-20020a25dfcd000000b00628d031e3a7mr14090539ybg.305.1646783309668; Tue, 08 Mar 2022 15:48:29 -0800 (PST) Date: Tue, 8 Mar 2022 16:47:14 -0700 In-Reply-To: <20220308234723.3834941-1-yuzhao@google.com> Message-Id: <20220308234723.3834941-5-yuzhao@google.com> Mime-Version: 1.0 References: <20220308234723.3834941-1-yuzhao@google.com> X-Mailer: git-send-email 2.35.1.616.g0bdcbb4464-goog Subject: [PATCH v8 04/14] Revert "include/linux/mm_inline.h: fold __update_lru_size() into its sole caller" From: Yu Zhao To: Andrew Morton Cc: Andi Kleen , Aneesh Kumar , Catalin Marinas , Dave Hansen , Hillf Danton , Jens Axboe , Jesse Barnes , Johannes Weiner , Jonathan Corbet , Linus Torvalds , Matthew Wilcox , Mel Gorman , Michael Larabel , Michal Hocko , Mike Rapoport , Rik van Riel , Vlastimil Babka , Will Deacon , Ying Huang , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, page-reclaim@google.com, x86@kernel.org, Yu Zhao , 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-20220308_154831_376182_7F86117B X-CRM114-Status: GOOD ( 11.37 ) 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 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 cf90b1fa2c60..2c24f5ac3e2a 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