Skip to content

Commit

Permalink
anolis: mm, kidled: skip node which has none memory
Browse files Browse the repository at this point in the history
fix #36834759

Or the vmalloc() will print a warn message when the alloc size
equals zero, and kidled stop working.

Signed-off-by: Gang Deng <gavin.dg@linux.alibaba.com>
Reviewed-by: zhongjiang-ali <zhongjiang-ali@linux.alibaba.com>
Reviewed-by: Xu Yu <xuyu@linux.alibaba.com>
  • Loading branch information
Gang Deng committed Sep 18, 2021
1 parent d19dc91 commit 8defdd1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mm/kidled.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,10 @@ static bool kidled_scan_node(pg_data_t *pgdat,

#ifdef KIDLED_AGE_NOT_IN_PAGE_FLAGS
if (unlikely(!pgdat->node_page_age)) {
/* This node has none memory, skip it. */
if (!pgdat->node_spanned_pages)
return true;

pgdat->node_page_age = vzalloc(pgdat->node_spanned_pages);
if (unlikely(!pgdat->node_page_age))
return false;
Expand Down

0 comments on commit 8defdd1

Please sign in to comment.