From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Zi Yan <ziy@nvidia.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Nico Pache <npache@redhat.com>,
Ryan Roberts <ryan.roberts@arm.com>, Dev Jain <dev.jain@arm.com>,
Barry Song <baohua@kernel.org>, Lance Yang <lance.yang@linux.dev>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2] mm: khugepaged: make scan loops suspend aware
Date: Thu, 12 Feb 2026 09:30:28 +0100 [thread overview]
Message-ID: <0787227f-c707-42d2-8f57-5795ca19a53d@kernel.org> (raw)
In-Reply-To: <qk555c45mchdhz2ivjrrva73gja2d7uny4tu7qx2f6c5rhanhu@llk5m5gilog4>
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
next prev parent reply other threads:[~2026-02-12 8:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-11 3:15 Sergey Senozhatsky
2026-02-11 6:15 ` Nico Pache
2026-02-12 1:51 ` Sergey Senozhatsky
2026-02-11 9:50 ` David Hildenbrand (Arm)
2026-02-12 1:50 ` Sergey Senozhatsky
2026-02-12 8:30 ` David Hildenbrand (Arm) [this message]
2026-02-12 8:42 ` Sergey Senozhatsky
2026-02-12 6:32 ` Sergey Senozhatsky
2026-02-12 8:44 ` David Hildenbrand (Arm)
2026-02-12 9:05 ` Sergey Senozhatsky
2026-02-12 9:10 ` David Hildenbrand (Arm)
2026-02-12 9:24 ` Sergey Senozhatsky
2026-02-14 6:35 ` Lance Yang
2026-02-16 9:24 ` David Hildenbrand (Arm)
2026-02-16 9:50 ` Sergey Senozhatsky
2026-02-16 10:05 ` Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0787227f-c707-42d2-8f57-5795ca19a53d@kernel.org \
--to=david@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=dev.jain@arm.com \
--cc=lance.yang@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=npache@redhat.com \
--cc=ryan.roberts@arm.com \
--cc=senozhatsky@chromium.org \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox