1 From 03705be42114db7cc5bd6eb7bf7e8703c94d4880 Mon Sep 17 00:00:00 2001
2 From: Yu Zhao <yuzhao@google.com>
3 Date: Sun, 18 Sep 2022 02:00:01 -0600
4 Subject: [PATCH 04/29] Revert "include/linux/mm_inline.h: fold
5 __update_lru_size() into its sole caller"
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 This patch undoes the following refactor: commit 289ccba18af4
11 ("include/linux/mm_inline.h: fold __update_lru_size() into its sole
14 The upcoming changes to include/linux/mm_inline.h will reuse
17 Link: https://lkml.kernel.org/r/20220918080010.2920238-5-yuzhao@google.com
18 Signed-off-by: Yu Zhao <yuzhao@google.com>
19 Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
20 Acked-by: Brian Geffon <bgeffon@google.com>
21 Acked-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
22 Acked-by: Oleksandr Natalenko <oleksandr@natalenko.name>
23 Acked-by: Steven Barrett <steven@liquorix.net>
24 Acked-by: Suleiman Souhlal <suleiman@google.com>
25 Tested-by: Daniel Byrne <djbyrne@mtu.edu>
26 Tested-by: Donald Carr <d@chaos-reins.com>
27 Tested-by: Holger Hoffstätte <holger@applied-asynchrony.com>
28 Tested-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
29 Tested-by: Shuang Zhai <szhai2@cs.rochester.edu>
30 Tested-by: Sofia Trinh <sofia.trinh@edi.works>
31 Tested-by: Vaibhav Jain <vaibhav@linux.ibm.com>
32 Cc: Andi Kleen <ak@linux.intel.com>
33 Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
34 Cc: Barry Song <baohua@kernel.org>
35 Cc: Catalin Marinas <catalin.marinas@arm.com>
36 Cc: Dave Hansen <dave.hansen@linux.intel.com>
37 Cc: Hillf Danton <hdanton@sina.com>
38 Cc: Jens Axboe <axboe@kernel.dk>
39 Cc: Johannes Weiner <hannes@cmpxchg.org>
40 Cc: Jonathan Corbet <corbet@lwn.net>
41 Cc: Linus Torvalds <torvalds@linux-foundation.org>
42 Cc: Matthew Wilcox <willy@infradead.org>
43 Cc: Mel Gorman <mgorman@suse.de>
44 Cc: Michael Larabel <Michael@MichaelLarabel.com>
45 Cc: Michal Hocko <mhocko@kernel.org>
46 Cc: Mike Rapoport <rppt@kernel.org>
47 Cc: Mike Rapoport <rppt@linux.ibm.com>
48 Cc: Peter Zijlstra <peterz@infradead.org>
49 Cc: Qi Zheng <zhengqi.arch@bytedance.com>
50 Cc: Tejun Heo <tj@kernel.org>
51 Cc: Vlastimil Babka <vbabka@suse.cz>
52 Cc: Will Deacon <will@kernel.org>
53 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
55 include/linux/mm_inline.h | 9 ++++++++-
56 1 file changed, 8 insertions(+), 1 deletion(-)
58 --- a/include/linux/mm_inline.h
59 +++ b/include/linux/mm_inline.h
60 @@ -24,7 +24,7 @@ static inline int page_is_file_lru(struc
61 return !PageSwapBacked(page);
64 -static __always_inline void update_lru_size(struct lruvec *lruvec,
65 +static __always_inline void __update_lru_size(struct lruvec *lruvec,
66 enum lru_list lru, enum zone_type zid,
69 @@ -33,6 +33,13 @@ static __always_inline void update_lru_s
70 __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
71 __mod_zone_page_state(&pgdat->node_zones[zid],
72 NR_ZONE_LRU_BASE + lru, nr_pages);
75 +static __always_inline void update_lru_size(struct lruvec *lruvec,
76 + enum lru_list lru, enum zone_type zid,
79 + __update_lru_size(lruvec, lru, zid, nr_pages);
81 mem_cgroup_update_lru_size(lruvec, lru, zid, nr_pages);