linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <richard.weiyang@gmail.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
	Wei Yang <richard.weiyang@gmail.com>,
	akpm@linux-foundation.org, lorenzo.stoakes@oracle.com,
	vbabka@suse.cz, jannh@google.com, linux-mm@kvack.org
Subject: Re: [PATCH] mm/vma: check retry_merge only for new vma case
Date: Mon, 18 Nov 2024 09:31:09 +0000	[thread overview]
Message-ID: <20241118093109.rmfekrv65yfu735t@master> (raw)
In-Reply-To: <av33suqyxftpfzrxcigas2rt3wpu5nbgjqqqbrjdncdncws7vr@33nmyksum3yj>

On Sun, Nov 17, 2024 at 10:56:55PM -0500, Liam R. Howlett wrote:
>* Wei Yang <richard.weiyang@gmail.com> [241117 21:21]:
>> Current code logic looks like this:
>> 
>> __mmap_region()
>>   vma = vma_merge_new_range(&vmg)
>>   if (!vma)
>>     __mmap_new_vma(&map, &vma)
>>       __mmap_new_file_vma(map, vma)
>>         map->retry_merge = xxx               --- (1)
>>   if (map.retry_merge)
>>     vma_merge_existing_range(vmg, &map, vma)
>
>Please don't quote code in your commit log.  We can see the code in the
>diff section.
>

Sure, maybe I misunderstand Lorenzo's suggestion in pre-previous review.

Will not add these in change log in the future.

>> 
>> Location (1) is the only place where map.retry_merge is set, this means
>> it is not necessary to check it if already merged with adjacent vma.
>> 
>> Let's move the check and following operation into new vma case.
>
>This makes sense, but this is a complex block of code.
>
>I'm all for optimisations, but there is already a bug in the code that
>you relocated in your patch, and the backport of these changes isn't
>even complete.
>
>Maybe we can give the existing code some time to soak before optimising?
>

Sure, when is a proper time to re-send it if everything is fine?


-- 
Wei Yang
Help you, Help me


  reply	other threads:[~2024-11-18  9:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18  2:18 Wei Yang
2024-11-18  3:56 ` Liam R. Howlett
2024-11-18  9:31   ` Wei Yang [this message]
2024-11-18 10:06     ` Lorenzo Stoakes
2024-11-18 10:04 ` Lorenzo Stoakes
2024-11-18 12:34   ` Wei Yang
2024-11-18 12:52     ` Lorenzo Stoakes
2024-11-19  0:59       ` Wei Yang
2024-11-19 10:14         ` Lorenzo Stoakes

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=20241118093109.rmfekrv65yfu735t@master \
    --to=richard.weiyang@gmail.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=jannh@google.com \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=vbabka@suse.cz \
    /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