From patchwork Tue Jun 14 07:16:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yu Zhao X-Patchwork-Id: 12880558 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 117E6C433EF for ; Tue, 14 Jun 2022 07:19:58 +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=xa0GueRuqbFKp/IkGWLJ7gmv/SH/GHDnujLKqBCBWkI=; b=quLnarDFniLkkw1lkhlZtGNU/I 1bPsruKreHR/F7qyzN0lADuqHt/DWJvJ4JtrhvxaiW5Pc16I+XOJqgSw+UKGfSHeFXEDi5qRvrPXa s3efQy5V33zG2FuIgN9NHT9hEsatDnzIvS/arYYpC0TjdrUm+gVivnQJqmBGjIcs2Lka4+LWkv2cg AO9cRrbzd76VFUbO9p1i5lY0XTxOiGQBWIUd+FK+fYC2FvKqSzKYNgWL2eo4khr2VVgqeRZeT0vcc uf/6RlcY+9nngVOVULcUVdsL83bSj1CNMdJvkPsu8xAWGNVd1M0FEEEoWdE8YfSBErQS4oWwcvGLK cCFUtt/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o10ow-007b5t-RU; Tue, 14 Jun 2022 07:18:39 +0000 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o10nu-007aPQ-9D for linux-arm-kernel@lists.infradead.org; Tue, 14 Jun 2022 07:17:37 +0000 Received: by mail-yb1-xb49.google.com with SMTP id j11-20020a05690212cb00b006454988d225so6882144ybu.10 for ; Tue, 14 Jun 2022 00:17:32 -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=D1tI7WDD6BkSp8vdJUGyasd9RspDYVcf2s3K3k00n8E=; b=oVRZoBVjG7Z4RBep9kZJo6+f/8GPme9EC4Rjg3mMbmfp42nGp5yz4K6r1QvXRcxPJN 9mMsDFeH6u1+l2WSoQ3O6zlXfQR4yhMIySD4Z/GkwdIaewcfx6jJrixTMAAqtgMsa34q RWlzUXwTCHNovn+liPTEnS7IyzwYNVTpiZlKrhsx4qhGPdMXNEitlBg7tE3NeJZWPJH1 nTt1+klEynatT9dGdyS+6oZr5/WQoTUASriruXj9BnKhuytK+J2aIZNhfOtOrVdIxPuh jSLKFFaZSA+H5uB9Tl0el85eepw4IilpgV9W609BtW5CIgwFJw6QSZYoKZ6+yIMqmqg9 4A1Q== 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=D1tI7WDD6BkSp8vdJUGyasd9RspDYVcf2s3K3k00n8E=; b=zft01nMNwVsnsqiej3mUxnrTgbspLC41q4vDeBL1RbhQRki2GG0TlvRqzQ8CzxmFjp b7JAxprrSpfxO3/g0+WC4HTL/oj91nDC6wsV70Gu+tWAy0d3F2cTcpMlQnLdOJxcOEFb GnaTI9HmfguUvT7w6ibzO3GjwgJqNhv6ERZhA5XTydBW0lp04Dl2bT1pVO/3zGOh//55 wIZDVgoEgRO1IywH2+ttvsSKzA6UrQp8EeLK4crW91ZSDUydXFGuX/1w09eW4d216y5S WqelQCPmA8+XuAbHOymmQ7Qwzmzy8eMMfKR8O3O8PW5ts0NYQ4yHHfHBrEmkK8LBY0j9 FNZA== X-Gm-Message-State: AJIora/wKMhIZo65wexHPIlXeAveIHBuubAtsjD30Ub0N1eS/JgpFYrb P8K8YujOvbcy4ZeziZNxENpySoJgJtg= X-Google-Smtp-Source: AGRyM1toFkvdpMNGM0kO7TSnX52idsIuCtYt4XUqDdqzJqgRklSPx3240tBaTFSm3AZCDyJ2di6Eb18fdcQ= X-Received: from yuzhao.bld.corp.google.com ([2620:15c:183:200:eaa7:1f3f:e74a:2a26]) (user=yuzhao job=sendgmr) by 2002:a25:3c45:0:b0:664:cf75:c2d6 with SMTP id j66-20020a253c45000000b00664cf75c2d6mr3416410yba.446.1655191051871; Tue, 14 Jun 2022 00:17:31 -0700 (PDT) Date: Tue, 14 Jun 2022 01:16:41 -0600 In-Reply-To: <20220614071650.206064-1-yuzhao@google.com> Message-Id: <20220614071650.206064-5-yuzhao@google.com> Mime-Version: 1.0 References: <20220614071650.206064-1-yuzhao@google.com> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog Subject: [PATCH v12 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-20220614_001734_458190_E0464259 X-CRM114-Status: GOOD ( 10.96 ) 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