From patchwork Mon Aug 15 07:13: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: 12943206 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 E50A7C00140 for ; Mon, 15 Aug 2022 07:16:33 +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=SLg6wt6q5AIywsSUxhxbxSGRQi/XNwIRS1Bt3ROeNAk=; b=PUNcu/JD+QFHwy/izs4Nf3+yEL n7iJWeRaG8dmKBhGL8G+aiQjrvKaOJlorEPvfYjTD89Ku0mFpGM18F0UdJ/XjVJe3ixFmo5J590hV UlhXUpU0ydELEkYyxJdg9ijwEpKCjJUXrTPZ5xvFZr5o7qXWlWSwcrgS96PE6B3tMpOg6rkwC/VJW VXdxs6+Bz4EEj+FnBc43zkubSRV6FgvRg5WGlDGe/Dz+amlOGLH2UOyH8OYYeTh4yOG9e3GoPfw1/ Qx6jZ0J5DQgiHEG2i+mXQffAlSvsyUUQhmNOo3M4tc2KsbO9gSl5wq/SlITXn5j0CGOA/4dbuG+3d 4l/AUk2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNUJk-00COGF-0I; Mon, 15 Aug 2022 07:15:20 +0000 Received: from mail-yw1-f201.google.com ([209.85.128.201]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNUIp-00CNhf-9a for linux-arm-kernel@lists.infradead.org; Mon, 15 Aug 2022 07:14:27 +0000 Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-31f3959ba41so51564897b3.2 for ; Mon, 15 Aug 2022 00:14:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:from:to:cc; bh=ohb0g91xU7D2DdYA0JL1cRax0OQX/W61A7iD2+1uSHg=; b=dVv56SDG5EnRcQXMZs6Ezlt98xykYA1hTodXE2lnoHYSxyrpaXDgnZt25dKOZ5gaSO S2MFDM/Kv+sJH9kS2kB7ziVaf2T9ZHUDBSuO3TV3SZhY7Ij9fLhIv3SG+KITwptljgV6 w6frt+X0PkDvIqzDWCKGfOWNKHbKAtG1uiKY9ZztzcR5Leaol7GekDlsjEyv7fKrVZZ1 0HfZ4uPIhe5kXIKFL+HQiRDJanA8fbiXtzXnmRU+InRk5t6nMihmNluu/R5f2oS3pH// ASN+5omr8+oWHvyHfo5322qaN2oeZRJlvTQs0A8wCxdNY+CQQBEsz8z1NQSVaxFzSEaH 3j3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:x-gm-message-state:from:to :cc; bh=ohb0g91xU7D2DdYA0JL1cRax0OQX/W61A7iD2+1uSHg=; b=Vf7walejwTs9i3Y/Suf8ekddiqeBpF18UINFH4HyVCnnXzi+fOyZDmgYtjhjDal7+e YphcioH9H/JzMynoB4C5hEnAAXU+3DvLp5RKUMSLBNVNf9R4c4IZngvoELaOGE+acxk3 yjy7SMpwupBEXy6K/Y90T4lSHArcaALpfgDz/iL3ijt97Gtu/QfFRayK+qRpBScdkPl0 mnDAYIGNK1YJF/JMPCsqSggoS4b4mfpY5/7YFxD/zo4lGfK6JNbuNeAZTck56p9tZQ1W Ay5k+sHOVO8tYu0MUQ3htFiL+p9r2+5e8dCKx8FuPWsAapnaI1ZYd2YhBJc/l9h9+egf y2Rg== X-Gm-Message-State: ACgBeo2l20407oNfYriio/nJvcaA8mUobwZR2jFFcyqYloo0D7uFuqSU xbCK1skU1K8aYONM8qZ9Y4T2uxFR8xQ= X-Google-Smtp-Source: AA6agR4o82qI9d9hU/6omiKprw+LPrjRcmI3uYcb9udtkqgeRITd057VCgySuKCF1NblY2iSEHVTEXu2yHI= X-Received: from yuzhao.bld.corp.google.com ([2620:15c:183:200:d91:5887:ac93:ddf0]) (user=yuzhao job=sendgmr) by 2002:a81:7382:0:b0:328:306f:26d2 with SMTP id o124-20020a817382000000b00328306f26d2mr12012904ywc.486.1660547659513; Mon, 15 Aug 2022 00:14:19 -0700 (PDT) Date: Mon, 15 Aug 2022 01:13:23 -0600 In-Reply-To: <20220815071332.627393-1-yuzhao@google.com> Message-Id: <20220815071332.627393-5-yuzhao@google.com> Mime-Version: 1.0 References: <20220815071332.627393-1-yuzhao@google.com> X-Mailer: git-send-email 2.37.1.595.g718a3a8f04-goog Subject: [PATCH v14 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 , 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, linux-mm@kvack.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-20220815_001423_415154_AE57B800 X-CRM114-Status: GOOD ( 11.55 ) 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 7b25b53c474a..fb8aadb81cd6 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h @@ -34,7 +34,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) { @@ -43,6 +43,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, + long nr_pages) +{ + __update_lru_size(lruvec, lru, zid, nr_pages); #ifdef CONFIG_MEMCG mem_cgroup_update_lru_size(lruvec, lru, zid, nr_pages); #endif