Re: [PATCHv2] mm: khugepaged: make scan loops suspend aware
From: David Hildenbrand (Arm)
Date: Thu Feb 12 2026 - 03:30:43 EST
On 2/12/26 02:50, Sergey Senozhatsky wrote:
On (26/02/11 10:50), David Hildenbrand (Arm) wrote:
v1->v2: Actually pass "cc" to hpage_collapse_test_exit_or_disable()
mm/khugepaged.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index eff9e3061925..d32a5ad27097 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -392,10 +392,18 @@ static inline int hpage_collapse_test_exit(struct mm_struct *mm)
return atomic_read(&mm->mm_users) == 0;
}
-static inline int hpage_collapse_test_exit_or_disable(struct mm_struct *mm)
+static inline int hpage_collapse_test_exit_or_disable(struct mm_struct *mm,
+ struct collapse_control *cc)
Two-tab indent, please.
I initially had it like
@@ -393,7 +393,7 @@ static inline int hpage_collapse_test_exit(struct mm_struct *mm)
}
static inline int hpage_collapse_test_exit_or_disable(struct mm_struct *mm,
- struct collapse_control *cc)
+ struct collapse_control *cc)
{
but wasn't sure about the 80-col breakage. Is that what you meant by
two-tab indent?
In MM we prefer
static inline int hpage_collapse_test_exit_or_disable(struct mm_struct *mm,
struct collapse_control *cc)
^ two tabs
Because it's the least ugly when you have long functions + many parameters, and
renaming the function/changing return type will often not require touching each and
every other parameter line.
--
Cheers,
David