Skip to content

Commit 9ef56b7

Browse files
Muchun Songtorvalds
authored andcommitted
mm: vmscan: remove noinline_for_stack
The noinline_for_stack is introduced by commit 6663562 ("vmscan: set up pagevec as late as possible in shrink_inactive_list()"), its purpose is to delay the allocation of pagevec as late as possible to save stack memory. But the commit 2bcf887 ("mm: take pagevecs off reclaim stack") replace pagevecs by lists of pages_to_free. So we do not need noinline_for_stack, just remove it (let the compiler decide whether to inline). Link: https://lkml.kernel.org/r/20210417043538.9793-9-songmuchun@bytedance.com Signed-off-by: Muchun Song <songmuchun@bytedance.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Roman Gushchin <guro@fb.com> Reviewed-by: Shakeel Butt <shakeelb@google.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Vladimir Davydov <vdavydov.dev@gmail.com> Cc: Xiongchun Duan <duanxiongchun@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 271dd6b commit 9ef56b7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mm/vmscan.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,8 +2015,8 @@ static int too_many_isolated(struct pglist_data *pgdat, int file,
20152015
*
20162016
* Returns the number of pages moved to the given lruvec.
20172017
*/
2018-
static unsigned noinline_for_stack move_pages_to_lru(struct lruvec *lruvec,
2019-
struct list_head *list)
2018+
static unsigned int move_pages_to_lru(struct lruvec *lruvec,
2019+
struct list_head *list)
20202020
{
20212021
int nr_pages, nr_moved = 0;
20222022
LIST_HEAD(pages_to_free);
@@ -2096,7 +2096,7 @@ static int current_may_throttle(void)
20962096
* shrink_inactive_list() is a helper for shrink_node(). It returns the number
20972097
* of reclaimed pages
20982098
*/
2099-
static noinline_for_stack unsigned long
2099+
static unsigned long
21002100
shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
21012101
struct scan_control *sc, enum lru_list lru)
21022102
{

0 commit comments

Comments
 (0)