Message ID | 20220407031525.2368067-5-yuzhao@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Multi-Gen LRU Framework | expand |
On 2022/4/7 11:15, Yu Zhao wrote: > 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 <yuzhao@google.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> > --- > include/linux/mm_inline.h | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > Looks good to me. Thanks! Reviewed-by: Miaohe Lin <linmiaohe@huawei.com> > diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h > index ac32125745ab..7c9c2157e9a8 100644 > --- a/include/linux/mm_inline.h > +++ b/include/linux/mm_inline.h > @@ -32,7 +32,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) > { > @@ -41,6 +41,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, > + int nr_pages) > +{ > + __update_lru_size(lruvec, lru, zid, nr_pages); > #ifdef CONFIG_MEMCG > mem_cgroup_update_lru_size(lruvec, lru, zid, nr_pages); > #endif >
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index ac32125745ab..7c9c2157e9a8 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h @@ -32,7 +32,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) { @@ -41,6 +41,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, + int nr_pages) +{ + __update_lru_size(lruvec, lru, zid, nr_pages); #ifdef CONFIG_MEMCG mem_cgroup_update_lru_size(lruvec, lru, zid, nr_pages); #endif