linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	Dev Jain <dev.jain@arm.com>
Cc: akpm@linux-foundation.org, ziy@nvidia.com,
	baolin.wang@linux.alibaba.com, Liam.Howlett@oracle.com,
	npache@redhat.com, ryan.roberts@arm.com, baohua@kernel.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] khugepaged: Optimize collapse_pte_mapped_thp() for large folios by PTE batching
Date: Mon, 23 Jun 2025 16:01:34 +0200	[thread overview]
Message-ID: <2930133f-371d-4846-968f-6137ae1b3156@redhat.com> (raw)
In-Reply-To: <023a65d4-5f69-42fc-ab43-b73e44d6cd10@lucifer.local>

>>>
>>>>    mm/khugepaged.c | 38 +++++++++++++++++++++++++-------------
>>>>    1 file changed, 25 insertions(+), 13 deletions(-)
>>>>
>>>> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
>>>> index 649ccb2670f8..7d37058eda5b 100644
>>>> --- a/mm/khugepaged.c
>>>> +++ b/mm/khugepaged.c
>>>> @@ -1499,15 +1499,16 @@ static int set_huge_pmd(struct vm_area_struct *vma, unsigned long addr,
>>>>    int collapse_pte_mapped_thp(struct mm_struct *mm, unsigned long addr,
>>>>    			    bool install_pmd)
>>>>    {
>>>> +	int nr_mapped_ptes = 0, nr_batch_ptes, result = SCAN_FAIL;
>>> NIT: I don't know why you're moving this, and while y'know it's kind of the fun
>>> of subjective stuff I'd rather the assigned values and unassigned values be on
>>> different lines (yes I know this codebase violates this with the pml, ptl below
>>> but hey :P)
>>
>> To maintain a reverse Xmas fashion. Now I know that the declarations are already
>> not in an Xmas fashion, but I wanted to make sure the code I change maintains
>> that for the part I am changing :)
> 
> We have no such requirement in mm nor do we particularly want to establish any
> conventions around this.

Well, if we already do have reverse xmas tree, we tend to maintain it

... or when adding new code.

So in MM it's actually very common to do that. But we avoid doing that 
just for the sake of it when touching some code.

-- 
Cheers,

David / dhildenb



  reply	other threads:[~2025-06-23 14:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-18 15:56 Dev Jain
2025-06-18 17:50 ` Lorenzo Stoakes
2025-06-19  3:48   ` Dev Jain
2025-06-19 12:55     ` Lorenzo Stoakes
2025-06-23 14:01       ` David Hildenbrand [this message]
2025-06-23  6:40 ` Baolin Wang
2025-06-23  7:16   ` Dev Jain
2025-06-23  7:21     ` Baolin Wang
2025-06-23  7:25       ` Dev Jain

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=2930133f-371d-4846-968f-6137ae1b3156@redhat.com \
    --to=david@redhat.com \
    --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=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=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