Revert "include/linux/mm_inline.h: fold __update_lru_size() into its sole caller"
This patch undoes the following refactor: commit 289ccba18a
("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().
Link: https://lkml.kernel.org/r/20220918080010.2920238-5-yuzhao@google.com
Signed-off-by: Yu Zhao <yuzhao@google.com>
Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Acked-by: Brian Geffon <bgeffon@google.com>
Acked-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Acked-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Acked-by: Steven Barrett <steven@liquorix.net>
Acked-by: Suleiman Souhlal <suleiman@google.com>
Tested-by: Daniel Byrne <djbyrne@mtu.edu>
Tested-by: Donald Carr <d@chaos-reins.com>
Tested-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Tested-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Tested-by: Shuang Zhai <szhai2@cs.rochester.edu>
Tested-by: Sofia Trinh <sofia.trinh@edi.works>
Tested-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Hillf Danton <hdanton@sina.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Michael Larabel <Michael@MichaelLarabel.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Родитель
f1e1a7be47
Коммит
aa1b67903a
|
@ -34,7 +34,7 @@ static inline int page_is_file_lru(struct page *page)
|
||||||
return folio_is_file_lru(page_folio(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,
|
enum lru_list lru, enum zone_type zid,
|
||||||
long nr_pages)
|
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_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
|
||||||
__mod_zone_page_state(&pgdat->node_zones[zid],
|
__mod_zone_page_state(&pgdat->node_zones[zid],
|
||||||
NR_ZONE_LRU_BASE + lru, nr_pages);
|
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
|
#ifdef CONFIG_MEMCG
|
||||||
mem_cgroup_update_lru_size(lruvec, lru, zid, nr_pages);
|
mem_cgroup_update_lru_size(lruvec, lru, zid, nr_pages);
|
||||||
#endif
|
#endif
|
||||||
|
|
Загрузка…
Ссылка в новой задаче