From nobody Sat Apr 11 08:11:48 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5497C282E7 for ; Mon, 15 Aug 2022 07:14:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230288AbiHOHOd (ORCPT ); Mon, 15 Aug 2022 03:14:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241417AbiHOHOV (ORCPT ); Mon, 15 Aug 2022 03:14:21 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F3CB15FEB for ; Mon, 15 Aug 2022 00:14:20 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-32fd9b85c35so30834277b3.23 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=vCmiaZCHqgxjPZGk5FofQyWwx2UQjBiXa8ZoYxLfMRDiOdPnGEVQGabOBDORuoZWPu /xeJYOpJyfCMwjaNioakKIgWCmyPdMtVS3x5+W/91EKS2YuhG0BfAGw5aWhj1rbeZp3o 8VVBIISorV7+f7/53baAWeqURGsFLIwWisM+XCKErE18aoSo6kHVXHh/NxzBYtYCCmCF 8v7tvlq1I2jwTrsJfgwjKv+KXHxiEUCzlfSPZ9vKPKbqCJqt+BieU0b2PcN7B7sprfYn a5d/t0ypdXLc4h74geTLgAEQ7XK4dPe6tDHR9aF3mClIhYk6E/tDDS3q5EHA3asZxEnq XpkQ== X-Gm-Message-State: ACgBeo2HRBPKYpWdX7v6iGKOrBTl576u+KAKdteLS3qDOxAKcE3i1ITZ o8XZUC8vtApzRSayp7fUksenyzqVRx8= 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=20Hoffst=C3=A4tte?=" , Konstantin Kharlamov , Shuang Zhai , Sofia Trinh , Vaibhav Jain Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" This patch undoes the following refactor: commit 289ccba18af4 ("include/linux/mm_inline.h: fold __update_lru_size() i= nto 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=C3=A4tte 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)); } =20 -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 lruve= c *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 --=20 2.37.1.595.g718a3a8f04-goog