[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7ecb1d90-91c3-2f78-162a-1c1c4fa7e386@amd.com>
Date: Tue, 28 Feb 2023 10:29:38 +0530
From: Raghavendra K T <raghavendra.kt@....com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Ingo Molnar <mingo@...hat.com>, Mel Gorman <mgorman@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
David Hildenbrand <david@...hat.com>, rppt@...nel.org,
Bharata B Rao <bharata@....com>,
Disha Talreja <dishaa.talreja@....com>
Subject: Re: [PATCH V2 2/3] sched/numa: Enhance vma scanning logic
On 2/4/2023 11:44 PM, Raghavendra K T wrote:
> On 2/3/2023 4:45 PM, Peter Zijlstra wrote:
>> On Wed, Feb 01, 2023 at 01:32:21PM +0530, Raghavendra K T wrote:
[...]>>> diff --git a/mm/memory.c b/mm/memory.c
>>> index 8c8420934d60..2ec3045cb8b3 100644
>>> --- a/mm/memory.c
>>> +++ b/mm/memory.c
>>> @@ -4718,6 +4718,7 @@ static vm_fault_t do_numa_page(struct vm_fault
>>> *vmf)
>>> bool was_writable = pte_savedwrite(vmf->orig_pte);
>>> int flags = 0;
>>> + vma_set_active_pid_bit(vma);
>>> /*
>>> * The "pte" at this point cannot be used safely without
>>> * validation through pte_unmap_same(). It's of NUMA type but
>>
>> Urghh... do_*numa_page() is two near identical functions.. is there
>> really no sane way to de-duplicate at least some of that?
>>
>
> Agree. I will explore and will take that as a separate TODO.
>
Did spend some time to look at if there is a better way of merging these
two.
code looks similar as you noted, with very subtle changes (pte vs pmd
and difference in unlock).
But I thought only some part of the code can be changed easily, but
changing whole code did not look to be worth as of now.
(unless we come up with better idea)
This is the only comment perhaps not addressed rightly I feel :(
Thanks
Powered by blists - more mailing lists