* Re: [PATCH V2] mm/khugepaged: fix comment for default scan sleep duration
2025-10-15 9:29 [PATCH V2] mm/khugepaged: fix comment for default scan sleep duration wang lian
@ 2025-10-15 9:38 ` David Hildenbrand
2025-10-15 9:44 ` wang lian
2025-10-15 17:40 ` SeongJae Park
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: David Hildenbrand @ 2025-10-15 9:38 UTC (permalink / raw)
To: wang lian, Andrew Morton
Cc: Lorenzo Stoakes, Zi Yan, Baolin Wang, Liam R. Howlett,
Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang,
Andrea Arcangeli, Rik van Riel, Wei Yang, linux-mm, linux-kernel
On 15.10.25 11:29, wang lian wrote:
> The comment for khugepaged_scan_sleep_millisecs incorrectly states
> the default scan period is 30 seconds. The actual default value in the
> code is 10000ms (10 seconds).
>
> This patch corrects the comment to match the code, preventing potential
> confusion. The incorrect comment has existed since the feature was
> first introduced.
"While at it, replace the magic value 512 by HPAGE_PMD_NR and use 'ptes'."
>
> Fixes: ba76149f47d8 ("thp: khugepaged")
I prefer to not have fixes for comments. It tricks people into thinking
that this might warrant a backport.
Likely no need to resend and Andrew can fix it up when applying.
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers
David / dhildenb
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH V2] mm/khugepaged: fix comment for default scan sleep duration
2025-10-15 9:38 ` David Hildenbrand
@ 2025-10-15 9:44 ` wang lian
0 siblings, 0 replies; 6+ messages in thread
From: wang lian @ 2025-10-15 9:44 UTC (permalink / raw)
To: David Hildenbrand
Cc: Andrew Morton, Lorenzo Stoakes, Zi Yan, Baolin Wang,
Liam R. Howlett, Nico Pache, Ryan Roberts, Dev Jain, Barry Song,
Lance Yang, Andrea Arcangeli, Rik van Riel, Wei Yang, linux-mm,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 448 bytes --]
Ok, I get it, thanks.
> On Oct 15, 2025, at 17:38, David Hildenbrand <david@redhat.com> wrote:
>
> "While at it, replace the magic value 512 by HPAGE_PMD_NR and use 'ptes'."
>
>> Fixes: ba76149f47d8 ("thp: khugepaged")
>
> I prefer to not have fixes for comments. It tricks people into thinking that this might warrant a backport.
>
> Likely no need to resend and Andrew can fix it up when applying.
--
Best Regards,
wang lian
[-- Attachment #2: Type: text/html, Size: 3942 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V2] mm/khugepaged: fix comment for default scan sleep duration
2025-10-15 9:29 [PATCH V2] mm/khugepaged: fix comment for default scan sleep duration wang lian
2025-10-15 9:38 ` David Hildenbrand
@ 2025-10-15 17:40 ` SeongJae Park
2025-10-15 18:30 ` Vishal Moola (Oracle)
2025-10-17 14:50 ` [V2] " Nico Pache
3 siblings, 0 replies; 6+ messages in thread
From: SeongJae Park @ 2025-10-15 17:40 UTC (permalink / raw)
To: wang lian
Cc: SeongJae Park, Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Zi Yan, Baolin Wang, Liam R. Howlett, Nico Pache, Ryan Roberts,
Dev Jain, Barry Song, Lance Yang, Andrea Arcangeli, Rik van Riel,
Wei Yang, linux-mm, linux-kernel
On Wed, 15 Oct 2025 17:29:57 +0800 wang lian <lianux.mm@gmail.com> wrote:
> The comment for khugepaged_scan_sleep_millisecs incorrectly states
> the default scan period is 30 seconds. The actual default value in the
> code is 10000ms (10 seconds).
>
> This patch corrects the comment to match the code, preventing potential
> confusion. The incorrect comment has existed since the feature was
> first introduced.
>
> Fixes: ba76149f47d8 ("thp: khugepaged")
>
> Signed-off-by: wang lian <lianux.mm@gmail.com>
> Suggested-by: David Hildenbrand <david@redhat.com>
> Reviewed-by: Dev Jain <dev.jain@arm.com>
> Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
> Reviewed-by: Lance Yang <lance.yang@linux.dev>
Reviewed-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH V2] mm/khugepaged: fix comment for default scan sleep duration
2025-10-15 9:29 [PATCH V2] mm/khugepaged: fix comment for default scan sleep duration wang lian
2025-10-15 9:38 ` David Hildenbrand
2025-10-15 17:40 ` SeongJae Park
@ 2025-10-15 18:30 ` Vishal Moola (Oracle)
2025-10-17 14:50 ` [V2] " Nico Pache
3 siblings, 0 replies; 6+ messages in thread
From: Vishal Moola (Oracle) @ 2025-10-15 18:30 UTC (permalink / raw)
To: wang lian
Cc: Andrew Morton, David Hildenbrand, Lorenzo Stoakes, Zi Yan,
Baolin Wang, Liam R. Howlett, Nico Pache, Ryan Roberts, Dev Jain,
Barry Song, Lance Yang, Andrea Arcangeli, Rik van Riel, Wei Yang,
linux-mm, linux-kernel
On Wed, Oct 15, 2025 at 05:29:57PM +0800, wang lian wrote:
> The comment for khugepaged_scan_sleep_millisecs incorrectly states
> the default scan period is 30 seconds. The actual default value in the
> code is 10000ms (10 seconds).
>
> This patch corrects the comment to match the code, preventing potential
> confusion. The incorrect comment has existed since the feature was
> first introduced.
>
> Fixes: ba76149f47d8 ("thp: khugepaged")
>
> Signed-off-by: wang lian <lianux.mm@gmail.com>
> Suggested-by: David Hildenbrand <david@redhat.com>
> Reviewed-by: Dev Jain <dev.jain@arm.com>
> Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
> Reviewed-by: Lance Yang <lance.yang@linux.dev>
> ---
Reviewed-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [V2] mm/khugepaged: fix comment for default scan sleep duration
2025-10-15 9:29 [PATCH V2] mm/khugepaged: fix comment for default scan sleep duration wang lian
` (2 preceding siblings ...)
2025-10-15 18:30 ` Vishal Moola (Oracle)
@ 2025-10-17 14:50 ` Nico Pache
3 siblings, 0 replies; 6+ messages in thread
From: Nico Pache @ 2025-10-17 14:50 UTC (permalink / raw)
To: lianux.mm
Cc: Andrew Morton, David Hildenbrand, Lorenzo Stoakes, Zi Yan,
Baolin Wang, Liam R. Howlett, Ryan Roberts, Dev Jain, Barry Song,
Lance Yang, Andrea Arcangeli, Rik van Riel, Wei Yang, linux-mm,
linux-kernel
> The comment for khugepaged_scan_sleep_millisecs incorrectly states
> the default scan period is 30 seconds. The actual default value in the
> code is 10000ms (10 seconds).
>
> This patch corrects the comment to match the code, preventing potential
> confusion. The incorrect comment has existed since the feature was
> first introduced.
>
> Fixes: ba76149f47d8 ("thp: khugepaged")
>
> Signed-off-by: wang lian <lianux.mm@gmail.com>
> Suggested-by: David Hildenbrand <david@redhat.com>
> Reviewed-by: Dev Jain <dev.jain@arm.com>
> Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
> Reviewed-by: Lance Yang <lance.yang@linux.dev>
Nice cleanup for the comments!
Acked-by: Nico Pache <npache@redhat.com>
> ---
> mm/khugepaged.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index e947b96e1443..d635d821f611 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -67,7 +67,7 @@ enum scan_result {
> static struct task_struct *khugepaged_thread __read_mostly;
> static DEFINE_MUTEX(khugepaged_mutex);
>
> -/* default scan 8*512 pte (or vmas) every 30 second */
> +/* default scan 8*HPAGE_PMD_NR ptes (or vmas) every 10 second */
> static unsigned int khugepaged_pages_to_scan __read_mostly;
> static unsigned int khugepaged_pages_collapsed;
> static unsigned int khugepaged_full_scans;
>
^ permalink raw reply [flat|nested] 6+ messages in thread