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: 12943191 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75D5DC282E7 for ; Mon, 15 Aug 2022 07:14:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 16D616B007B; Mon, 15 Aug 2022 03:14:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 07FD36B007D; Mon, 15 Aug 2022 03:14:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D787A6B007E; Mon, 15 Aug 2022 03:14:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id B58B46B007B for ; Mon, 15 Aug 2022 03:14:20 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 93B95120594 for ; Mon, 15 Aug 2022 07:14:20 +0000 (UTC) X-FDA: 79800963480.02.5694800 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) by imf08.hostedemail.com (Postfix) with ESMTP id 358D21601C9 for ; Mon, 15 Aug 2022 07:14:20 +0000 (UTC) Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-329dc6c0d21so51415237b3.16 for ; Mon, 15 Aug 2022 00:14:19 -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=D5adptIZyRsluJXjdK19vnXOny4hkrBuabWGzgSbnoraUxjy4JJPxjECtsQnQ3zqWH u37WQAJVqDY5dx2MDT1ZtenXOq1u7duYSLM942wODz8tqyNLK25N+qD/ftj/71BHxmIn ZPSwM2lM+PUhGXfw3+RMKBdyI2pQDHUFOKZ94X6IYDFX5BaCGpaHmX+k7pHz3A0wCBU+ lKI1aUqeg0XcyApGV/38OjCamQEgLTiedysWwD0571Cc1RX9RZhfjz06Csn6sE+4EBui 1BF3fZIe0HrWSdh1YpOzHh9+1AJPqjKHYfrDdqa+CtgtgflUZxQwi9C7GY2BiQ1OuOj7 ZuPg== X-Gm-Message-State: ACgBeo2Ukb75d4I8FfUm9p00ZG3s97pebSlzF42oD7llWBLLaz53drMX wOgo5QLyM4CSbk7m9Yi5tLM/FteBQ9Y= 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660547660; a=rsa-sha256; cv=none; b=NylNTbUbA59Y4UMnXyBLNMjm5Yf8XZcUqolOoT6IExGz2z+aCjcU66GapvfiODrTg9PdrV q5dPgcG3Ue8AoKGzwWgu1LOm4Y1VTyHPDe3NzgBfx/nrIcJ4MrLinvzDwV1wwvJvyfB7vP SkgYdkyN9QV4XuBgvgbCeMOU3y+YHLM= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=dVv56SDG; spf=pass (imf08.hostedemail.com: domain of 3S_L5YgYKCDYqmrZSgYggYdW.Ugedafmp-eecnSUc.gjY@flex--yuzhao.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3S_L5YgYKCDYqmrZSgYggYdW.Ugedafmp-eecnSUc.gjY@flex--yuzhao.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660547660; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ohb0g91xU7D2DdYA0JL1cRax0OQX/W61A7iD2+1uSHg=; b=qFez0g61oZl75myX37PQIIZ9gXZirwnVVT7EvtGqr6RUlJp/yPonE+goH5nEKQy99umn2a C45UuSETLItTYXeUJnFCx799kja2xzh7JBOLpoKGHcqS+0iWgVGMaMqjsr9pI0bwX/7+2G 5gknmUprC4OCEZhPMuMSBVNLCFlx98M= X-Rspamd-Queue-Id: 358D21601C9 Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=dVv56SDG; spf=pass (imf08.hostedemail.com: domain of 3S_L5YgYKCDYqmrZSgYggYdW.Ugedafmp-eecnSUc.gjY@flex--yuzhao.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3S_L5YgYKCDYqmrZSgYggYdW.Ugedafmp-eecnSUc.gjY@flex--yuzhao.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspam-User: X-Rspamd-Server: rspam12 X-Stat-Signature: xay8ns3hwdfoq5gamo94yaqd9s9hj4o1 X-HE-Tag: 1660547660-95042 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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