linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <richard.weiyang@gmail.com>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Wei Yang <richard.weiyang@gmail.com>,
	akpm@linux-foundation.org, Liam.Howlett@oracle.com,
	vbabka@suse.cz, jannh@google.com, linux-mm@kvack.org
Subject: Re: [PATCH 1/3] mm/vma: miss to restore vmi.index on expansion failure
Date: Fri, 25 Oct 2024 09:11:01 +0000	[thread overview]
Message-ID: <20241025091101.eizclmjq7rakfoky@master> (raw)
In-Reply-To: <87ab8c21-2dd5-438d-916a-2fd9c48679e1@lucifer.local>

On Fri, Oct 25, 2024 at 10:01:36AM +0100, Lorenzo Stoakes wrote:
>On Fri, Oct 25, 2024 at 08:54:09AM +0000, Wei Yang wrote:
>> On Fri, Oct 25, 2024 at 09:51:12AM +0100, Lorenzo Stoakes wrote:
>> >On Fri, Oct 25, 2024 at 08:49:19AM +0000, Wei Yang wrote:
>> >> On Fri, Oct 25, 2024 at 09:40:25AM +0100, Lorenzo Stoakes wrote:
>> >> >On Fri, Oct 25, 2024 at 08:32:27AM +0000, Wei Yang wrote:
>> >> >
>> >> >>
>> >> >> But I have a question on your introduction of VMG_FLAG_JUST_EXPAND.
>> >> >>
>> >> >> Lets say just_expand is true and can_merge_left is true. Now we will adjust
>> >> >> vmg->start/vma/pgoff in if (can_merge_left). If we fail expansion, we won't
>> >> >> restore vmg->vma/start/pgoff, since just_expand is true.
>> >> >>
>> >> >> Is this what you expect?
>> >> >
>> >> >Yes, I explicitly wrote it to do that so it'd be a bit odd if I didn't
>> >> >realise :)
>> >> >
>> >> >Actually at this point, I don't think we need a follow up patch, sorry.
>> >> >
>> >> >As I think perhaps I will make this change as part of an existing series
>> >> >where I am reworking mmap_region(), since this is the only place where it
>> >> >matters, and it would make everything a hell of a lot clearer.
>> >> >
>> >> >Thanks for pointing this out, it's very useful (and an embarrassing
>> >> >oversight on my part...!), but I think it'd be better reworked this way.
>> >> >
>> >> >Thanks!
>> >>
>> >> Ok, for now I would just remove these two lines with the change log you
>> >> suggested.
>> >
>> >NO! Sorry I've not been clear - don't send any series.
>> >
>> >I am going to make a change that eliminates the need for your change (sorry, but
>> >in discussing this I've realised that's the best way forward).
>> >
>>
>> Sure, go ahead.
>
>Thanks, apologies I know it sucks, to be clear I very much appreciate your
>input here!
>

Ha, np. Glad to talk with you.

>For more detail - we are refactoring how the '2nd attempt' at a merge
>works, also avoiding any abuse of vmg-> fields to keep track of start/end
>of a range, so it becomes better to just open-code 'reset' of these fields
>precisely at the point we need them.
>

I am not sure we mention the same thing.

One confusion during code reading is on the vmg->start/end and
vmg->vmi->mas->index/last.

For many times I lost who is who...

>Do please let us know if you notice any other silly mistakes like this :>)
>

Let me clear my glasses :-)

>Thanks, Lorenzo
>
>>
>> >>
>> >> --
>> >> Wei Yang
>> >> Help you, Help me
>> >>
>>
>> --
>> Wei Yang
>> Help you, Help me
>>

-- 
Wei Yang
Help you, Help me


  reply	other threads:[~2024-10-25  9:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-25  3:18 [PATCH 0/3] " Wei Yang
2024-10-25  3:18 ` [PATCH 1/3] " Wei Yang
2024-10-25  7:06   ` Lorenzo Stoakes
2024-10-25  7:43     ` Wei Yang
2024-10-25  7:59     ` Wei Yang
2024-10-25  8:10       ` Lorenzo Stoakes
2024-10-25  8:32         ` Wei Yang
2024-10-25  8:40           ` Lorenzo Stoakes
2024-10-25  8:49             ` Wei Yang
2024-10-25  8:51               ` Lorenzo Stoakes
2024-10-25  8:54                 ` Wei Yang
2024-10-25  9:01                   ` Lorenzo Stoakes
2024-10-25  9:11                     ` Wei Yang [this message]
2024-10-25  3:18 ` [PATCH 2/3] tools: test vmi.index would be restored on merge failure Wei Yang
2024-10-25  3:18 ` [PATCH 3/3] tools: fix build error on parameter name omitted Wei Yang
2024-10-25  6:50   ` Lorenzo Stoakes
2024-10-25 20:06 ` [PATCH 0/3] mm/vma: miss to restore vmi.index on expansion failure Liam R. Howlett
2024-10-25 20: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=20241025091101.eizclmjq7rakfoky@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