mm/khugepaged: fix comment for default scan sleep duration
Subsystems (2)
PATCH 1/1 mm/khugepaged: fix comment for default scan sleep duration
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.
--- mm/khugepaged.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/khugepaged.c +1 -1
@@ -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*512 pte (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;
Signature · 1 line
2.50.1 (Apple Git-155)
Quoted 4 lines · wang lian
The comment for
khugepaged_scan_sleep_millisecsincorrectly states the default scan period is 30 seconds. The actual default value in the code is 10000ms (10 seconds).
Quoted 8 lines
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 <[email protected]>---
Quoted 11 lines · wang lian
The comment for
khugepaged_scan_sleep_millisecsincorrectly 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 <[email protected]>---
Thanks!
Quoted 16 lines
mm/khugepaged.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/khugepaged.c +1
-1@@ -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*512 pte (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;
Quoted 10 lines · wang lian
The comment for
khugepaged_scan_sleep_millisecsincorrectly 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 <[email protected]>
Signature · 2 lines
Wei Yang Help you, Help me
Quoted 19 lines · wang lian
The comment for
khugepaged_scan_sleep_millisecsincorrectly 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 <[email protected]>--- mm/khugepaged.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/khugepaged.c +0
-0
mm/khugepaged.c enum scan_result { · line 70
Quoted 5 lines
mm/khugepaged.c +1
-1@@ -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*512 pte (or vmas) every 10 second */
We should improve the 512 part while at it (e.g., on arm64 with 64k page size it's 2048, on s390x it's 256).
And s/pte/ptes/.
/* default scan 8*HPAGE_PMD_NR ptes (or vmas) every 10 second */
Signature · 3 lines
Cheers David / dhildenb
Hi David,
Thanks for the great suggestions!
That indeed makes the comment much better.
I will send out a v2 shortly.
Quoted 7 lines · David Hildenbrand
We should improve the 512 part while at it (e.g., on arm64 with 64k page size it's 2048, on s390x it's 256).
And s/pte/ptes/.
/* default scan 8*HPAGE_PMD_NR ptes (or vmas) every 10 second */
Best Regards,
Wang Lian