lkml.org 
[lkml]   [2022]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] mm/vmscan: make sure wakeup_kswapd with managed zone
On Mon, Mar 28, 2022 at 09:08:34AM +0800, Huang, Ying wrote:
>Hi, Wei,
>
>Wei Yang <richard.weiyang@gmail.com> writes:
>
>> wakeup_kswapd() only wake up kswapd when the zone is managed.
>>
>> For two callers of wakeup_kswapd(), they are node perspective.
>>
>> * wake_all_kswapds
>> * numamigrate_isolate_page
>>
>> If we picked up a !managed zone, this is not we expected.
>>
>> This patch makes sure we pick up a managed zone for wakeup_kswapd().
>>
>> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
>> ---
>> mm/migrate.c | 2 +-
>> mm/page_alloc.c | 2 ++
>> 2 files changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/mm/migrate.c b/mm/migrate.c
>> index 3d60823afd2d..c4b654c0bdf0 100644
>> --- a/mm/migrate.c
>> +++ b/mm/migrate.c
>> @@ -2046,7 +2046,7 @@ static int numamigrate_isolate_page(pg_data_t *pgdat, struct page *page)
>> if (!(sysctl_numa_balancing_mode & NUMA_BALANCING_MEMORY_TIERING))
>> return 0;
>> for (z = pgdat->nr_zones - 1; z >= 0; z--) {
>> - if (populated_zone(pgdat->node_zones + z))
>> + if (managed_zone(pgdat->node_zones + z))
>
>This looks good to me! Thanks! It seems that we can replace
>populated_zone() in migrate_balanced_pgdat() too. Right?
>

Yes, you are right. I didn't spot this.

While this patch comes from the clue of wakeup_kswapd(), I am not sure it is
nice to put it in this patch together.

Which way you prefer to include this: merge the change into this one, or a
separate one?

--
Wei Yang
Help you, Help me

\
 
 \ /
  Last update: 2022-03-29 02:43    [W:1.413 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site