24b5c8f7970d6c714815454d5b0266a2513ef8a4
[openwrt/staging/blogic.git] /
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"
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 This patch undoes the following refactor: commit 289ccba18af4
11 ("include/linux/mm_inline.h: fold __update_lru_size() into its sole
12 caller")
13
14 The upcoming changes to include/linux/mm_inline.h will reuse
15 __update_lru_size().
16
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>
54 ---
55 include/linux/mm_inline.h | 9 ++++++++-
56 1 file changed, 8 insertions(+), 1 deletion(-)
57
58 diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
59 index 355ea1ee32bd..a822d6b690a5 100644
60 --- a/include/linux/mm_inline.h
61 +++ b/include/linux/mm_inline.h
62 @@ -24,7 +24,7 @@ static inline int page_is_file_lru(struct page *page)
63 return !PageSwapBacked(page);
64 }
65
66 -static __always_inline void update_lru_size(struct lruvec *lruvec,
67 +static __always_inline void __update_lru_size(struct lruvec *lruvec,
68 enum lru_list lru, enum zone_type zid,
69 int nr_pages)
70 {
71 @@ -33,6 +33,13 @@ static __always_inline void update_lru_size(struct lruvec *lruvec,
72 __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
73 __mod_zone_page_state(&pgdat->node_zones[zid],
74 NR_ZONE_LRU_BASE + lru, nr_pages);
75 +}
76 +
77 +static __always_inline void update_lru_size(struct lruvec *lruvec,
78 + enum lru_list lru, enum zone_type zid,
79 + long nr_pages)
80 +{
81 + __update_lru_size(lruvec, lru, zid, nr_pages);
82 #ifdef CONFIG_MEMCG
83 mem_cgroup_update_lru_size(lruvec, lru, zid, nr_pages);
84 #endif
85 --
86 2.40.0
87