* [PATCH v2] mm/compaction: fix set skip in fast_find_migrateblock
@ 2022-07-12 7:27 Zhou Chuyi
2022-07-13 2:23 ` Miaohe Lin
0 siblings, 1 reply; 4+ messages in thread
From: Zhou Chuyi @ 2022-07-12 7:27 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.
That cause fast_find_migrateblock useless.
In this Patch, when we find a suitable pageblock in
fast_find_migrateblock, we do noting but let
isolate_migratepages_block to set skip flag to
the pageblock after scan it. Normally, we would
isolate some pages from the fast-find block.
I use mmtest/thpscale-madvhugepage test it. Here
is the result:
baseline patch
Amean fault-both-1 1331.66 ( 0.00%) 1261.04 * 5.30%*
Amean fault-both-3 1383.95 ( 0.00%) 1191.69 * 13.89%*
Amean fault-both-5 1568.13 ( 0.00%) 1445.20 * 7.84%*
Amean fault-both-7 1819.62 ( 0.00%) 1555.13 * 14.54%*
Amean fault-both-12 1106.96 ( 0.00%) 1149.43 * -3.84%*
Amean fault-both-18 2196.93 ( 0.00%) 1875.77 * 14.62%*
Amean fault-both-24 2642.69 ( 0.00%) 2671.21 * -1.08%*
Amean fault-both-30 2901.89 ( 0.00%) 2857.32 * 1.54%*
Amean fault-both-32 3747.00 ( 0.00%) 3479.23 * 7.15%*
Fixs: 'commit 70b44595eafe9 ("mm, compaction: use free lists
to quickly locate a migration source")'
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 related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] mm/compaction: fix set skip in fast_find_migrateblock
2022-07-12 7:27 [PATCH v2] mm/compaction: fix set skip in fast_find_migrateblock Zhou Chuyi
@ 2022-07-13 2:23 ` Miaohe Lin
2022-07-13 3:13 ` Chuyi Zhou
0 siblings, 1 reply; 4+ messages in thread
From: Miaohe Lin @ 2022-07-13 2:23 UTC (permalink / raw)
To: Zhou Chuyi, linux-mm
On 2022/7/12 15:27, 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.
> That cause fast_find_migrateblock useless.
>
> In this Patch, when we find a suitable pageblock in
> fast_find_migrateblock, we do noting but let
> isolate_migratepages_block to set skip flag to
> the pageblock after scan it. Normally, we would
> isolate some pages from the fast-find block.
>
> I use mmtest/thpscale-madvhugepage test it. Here
> is the result:
> baseline patch
> Amean fault-both-1 1331.66 ( 0.00%) 1261.04 * 5.30%*
> Amean fault-both-3 1383.95 ( 0.00%) 1191.69 * 13.89%*
> Amean fault-both-5 1568.13 ( 0.00%) 1445.20 * 7.84%*
> Amean fault-both-7 1819.62 ( 0.00%) 1555.13 * 14.54%*
> Amean fault-both-12 1106.96 ( 0.00%) 1149.43 * -3.84%*
> Amean fault-both-18 2196.93 ( 0.00%) 1875.77 * 14.62%*
> Amean fault-both-24 2642.69 ( 0.00%) 2671.21 * -1.08%*
> Amean fault-both-30 2901.89 ( 0.00%) 2857.32 * 1.54%*
> Amean fault-both-32 3747.00 ( 0.00%) 3479.23 * 7.15%*
>
> Fixs: 'commit 70b44595eafe9 ("mm, compaction: use free lists
> to quickly locate a migration source")'
Thanks for your patch. Yet something to improve:
./scripts/checkpatch.pl v2-mm-compaction-fix-set-skip-in-fast_find_migrateblock.patch
ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 70b44595eafe ("mm, compaction: use free lists to quickly locate a migration source")'
#101:
Fixs: 'commit 70b44595eafe9 ("mm, compaction: use free lists
to quickly locate a migration source")'
total: 1 errors, 0 warnings, 7 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
[PATCH v2] mm_compaction fix set skip in fast_find_migrateblock.eml has style problems, please review.
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
And remember runing get_maintainer.pl to get the right people before sending the patch:
./scripts/get_maintainer.pl v2-mm-compaction-fix-set-skip-in-fast_find_migrateblock.patch
Andrew Morton <akpm@linux-foundation.org> (maintainer:MEMORY MANAGEMENT)
linux-mm@kvack.org (open list:MEMORY MANAGEMENT)
linux-kernel@vger.kernel.org (open list)
BTW: It's not enforced but ~70 chars per line in commit log might be preferred.
>
> Signed-off-by: zhouchuyi <zhouchuyi@bytedance.com>
Thanks.
> ---
> 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;
> }
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] mm/compaction: fix set skip in fast_find_migrateblock
2022-07-13 2:23 ` Miaohe Lin
@ 2022-07-13 3:13 ` Chuyi Zhou
2022-07-13 3:29 ` Miaohe Lin
0 siblings, 1 reply; 4+ messages in thread
From: Chuyi Zhou @ 2022-07-13 3:13 UTC (permalink / raw)
To: Miaohe Lin, linux-mm; +Cc: Andrew Morton
在 2022/7/13 上午10:23, Miaohe Lin 写道:
> On 2022/7/12 15:27, 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.
>> That cause fast_find_migrateblock useless.
>>
>> In this Patch, when we find a suitable pageblock in
>> fast_find_migrateblock, we do noting but let
>> isolate_migratepages_block to set skip flag to
>> the pageblock after scan it. Normally, we would
>> isolate some pages from the fast-find block.
>>
>> I use mmtest/thpscale-madvhugepage test it. Here
>> is the result:
>> baseline patch
>> Amean fault-both-1 1331.66 ( 0.00%) 1261.04 * 5.30%*
>> Amean fault-both-3 1383.95 ( 0.00%) 1191.69 * 13.89%*
>> Amean fault-both-5 1568.13 ( 0.00%) 1445.20 * 7.84%*
>> Amean fault-both-7 1819.62 ( 0.00%) 1555.13 * 14.54%*
>> Amean fault-both-12 1106.96 ( 0.00%) 1149.43 * -3.84%*
>> Amean fault-both-18 2196.93 ( 0.00%) 1875.77 * 14.62%*
>> Amean fault-both-24 2642.69 ( 0.00%) 2671.21 * -1.08%*
>> Amean fault-both-30 2901.89 ( 0.00%) 2857.32 * 1.54%*
>> Amean fault-both-32 3747.00 ( 0.00%) 3479.23 * 7.15%*
>>
>> Fixs: 'commit 70b44595eafe9 ("mm, compaction: use free lists
>> to quickly locate a migration source")'
>
> Thanks for your patch. Yet something to improve:
>
> ./scripts/checkpatch.pl v2-mm-compaction-fix-set-skip-in-fast_find_migrateblock.patch
> ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 70b44595eafe ("mm, compaction: use free lists to quickly locate a migration source")'
> #101:
> Fixs: 'commit 70b44595eafe9 ("mm, compaction: use free lists
> to quickly locate a migration source")'
>
> total: 1 errors, 0 warnings, 7 lines checked
>
> NOTE: For some of the reported defects, checkpatch may be able to
> mechanically convert to the typical style using --fix or --fix-inplace.
>
> [PATCH v2] mm_compaction fix set skip in fast_find_migrateblock.eml has style problems, please review.
>
> NOTE: If any of the errors are false positives, please report
> them to the maintainer, see CHECKPATCH in MAINTAINERS.
>
> And remember runing get_maintainer.pl to get the right people before sending the patch:
>
> ./scripts/get_maintainer.pl v2-mm-compaction-fix-set-skip-in-fast_find_migrateblock.patch
> Andrew Morton <akpm@linux-foundation.org> (maintainer:MEMORY MANAGEMENT)
> linux-mm@kvack.org (open list:MEMORY MANAGEMENT)
> linux-kernel@vger.kernel.org (open list)
>
> BTW: It's not enforced but ~70 chars per line in commit log might be preferred.
Thanks for your help sincerely. It seems I should use "Fixes". However,
I wonder to know why I run ./scripts/checkpatch.pl it shows :
total: 0 errors, 0 warnings, 7 lines checked
0001-mm-compaction-fix-set-skip-in-fast_find_migrateblock.patch has no
obvious style problems and is ready for submission.
I clone the kernel source from
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.
Maby I should clone the source from another place ?
>
>>
>> Signed-off-by: zhouchuyi <zhouchuyi@bytedance.com>
>
> Thanks.
>
>> ---
>> 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;
>> }
>> }
>>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] mm/compaction: fix set skip in fast_find_migrateblock
2022-07-13 3:13 ` Chuyi Zhou
@ 2022-07-13 3:29 ` Miaohe Lin
0 siblings, 0 replies; 4+ messages in thread
From: Miaohe Lin @ 2022-07-13 3:29 UTC (permalink / raw)
To: Chuyi Zhou, linux-mm; +Cc: Andrew Morton
On 2022/7/13 11:13, Chuyi Zhou wrote:
>
>
...
> Thanks for your help sincerely. It seems I should use "Fixes". However, I wonder to know why I run ./scripts/checkpatch.pl it shows :
> total: 0 errors, 0 warnings, 7 lines checked
> 0001-mm-compaction-fix-set-skip-in-fast_find_migrateblock.patch has no obvious style problems and is ready for submission.
>
> I clone the kernel source from https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable. Maby I should clone the source from another place ?
I usually use the git from https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/ when I
work on mm though I think checkpatch.pl should get the same result.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-13 3:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-12 7:27 [PATCH v2] mm/compaction: fix set skip in fast_find_migrateblock Zhou Chuyi
2022-07-13 2:23 ` Miaohe Lin
2022-07-13 3:13 ` Chuyi Zhou
2022-07-13 3:29 ` Miaohe Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).