linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/compaction: fix set skip in fast_find_migrateblock
@ 2022-07-11 12:32 Zhou Chuyi
  2022-07-12  2:26 ` Miaohe Lin
  0 siblings, 1 reply; 3+ messages in thread
From: Zhou Chuyi @ 2022-07-11 12:32 UTC (permalink / raw)
  To: linux-mm; +Cc: linmiaohe, zhouchuyi

From: zhouchuyi <zhouchuyi@bytedance.com>

When we successfully find a pageblock in fast_find_migrateblock(), the block will be set skip-flag through set_pageblock_skip(). However, when entering isolate_migratepages_block(), the whole pageblock will be skipped due to the branch 'if (!valid_page && IS_ALIGNED(low_pfn, pageblock_nr_pages))'. Eventually we will goto isolate_abort and isolate nothing.
Signed-off-by: zhouchuyi <zhouchuyi@bytedance.com>
---
 mm/compaction.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 1f89b969c..a1a2b50c8 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1852,7 +1852,6 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc)
 					pfn = cc->zone->zone_start_pfn;
 				cc->fast_search_fail = 0;
 				found_block = true;
-				set_pageblock_skip(freepage);
 				break;
 			}
 		}
-- 
2.20.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/compaction: fix set skip in fast_find_migrateblock
  2022-07-11 12:32 [PATCH] mm/compaction: fix set skip in fast_find_migrateblock Zhou Chuyi
@ 2022-07-12  2:26 ` Miaohe Lin
  2022-07-12  8:44   ` [External] " 周俶易
  0 siblings, 1 reply; 3+ messages in thread
From: Miaohe Lin @ 2022-07-12  2:26 UTC (permalink / raw)
  To: Zhou Chuyi, linux-mm; +Cc: Andrew Morton, linux-kernel

Add Cc Andrew and linux-kernel email list.

On 2022/7/11 20:32, Zhou Chuyi wrote:
> From: zhouchuyi <zhouchuyi@bytedance.com>
> 
> When we successfully find a pageblock in fast_find_migrateblock(), the block will be set skip-flag through set_pageblock_skip(). However, when entering isolate_migratepages_block(), the whole pageblock will be skipped due to the branch 'if (!valid_page && IS_ALIGNED(low_pfn, pageblock_nr_pages))'. Eventually we will goto isolate_abort and isolate nothing.
> Signed-off-by: zhouchuyi <zhouchuyi@bytedance.com>

It seems we should tweak the commit log to satisfy the checkpatch.pl first.

> ---
>  mm/compaction.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 1f89b969c..a1a2b50c8 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -1852,7 +1852,6 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc)
>  					pfn = cc->zone->zone_start_pfn;
>  				cc->fast_search_fail = 0;
>  				found_block = true;
> -				set_pageblock_skip(freepage);

This looks like a real problem. Should we add a Fixes tag here? What's the runtime effect of it?

Thanks for your patch!

>  				break;
>  			}
>  		}
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [External] Re: [PATCH] mm/compaction: fix set skip in fast_find_migrateblock
  2022-07-12  2:26 ` Miaohe Lin
@ 2022-07-12  8:44   ` 周俶易
  0 siblings, 0 replies; 3+ messages in thread
From: 周俶易 @ 2022-07-12  8:44 UTC (permalink / raw)
  To: Miaohe Lin, linux-mm; +Cc: Andrew Morton, linux-kernel



在 2022/7/12 上午10:26, Miaohe Lin 写道:
> Add Cc Andrew and linux-kernel email list.
> 
> On 2022/7/11 20:32, Zhou Chuyi wrote:
>> From: zhouchuyi <zhouchuyi@bytedance.com>
>>
>> When we successfully find a pageblock in fast_find_migrateblock(), the block will be set skip-flag through set_pageblock_skip(). However, when entering isolate_migratepages_block(), the whole pageblock will be skipped due to the branch 'if (!valid_page && IS_ALIGNED(low_pfn, pageblock_nr_pages))'. Eventually we will goto isolate_abort and isolate nothing.
>> Signed-off-by: zhouchuyi <zhouchuyi@bytedance.com>
> 
> It seems we should tweak the commit log to satisfy the checkpatch.pl first.
> 
>> ---
>>   mm/compaction.c | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/mm/compaction.c b/mm/compaction.c
>> index 1f89b969c..a1a2b50c8 100644
>> --- a/mm/compaction.c
>> +++ b/mm/compaction.c
>> @@ -1852,7 +1852,6 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc)
>>   					pfn = cc->zone->zone_start_pfn;
>>   				cc->fast_search_fail = 0;
>>   				found_block = true;
>> -				set_pageblock_skip(freepage);
> 
> This looks like a real problem. Should we add a Fixes tag here? What's the runtime effect of it?
> 
> Thanks for your patch!
sorry for this mistakes, I'm a beginner of Linux kernel. I will fix this 
problems in v2
> 
>>   				break;
>>   			}
>>   		}
>>
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-12  8:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11 12:32 [PATCH] mm/compaction: fix set skip in fast_find_migrateblock Zhou Chuyi
2022-07-12  2:26 ` Miaohe Lin
2022-07-12  8:44   ` [External] " 周俶易

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox