linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Raghavendra K T <raghavendra.kt@amd.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Ingo Molnar <mingo@redhat.com>, Mel Gorman <mgorman@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Hildenbrand <david@redhat.com>,
	rppt@kernel.org, Bharata B Rao <bharata@amd.com>,
	Disha Talreja <dishaa.talreja@amd.com>
Subject: Re: [PATCH V2 2/3] sched/numa: Enhance vma scanning logic
Date: Tue, 28 Feb 2023 10:29:38 +0530	[thread overview]
Message-ID: <7ecb1d90-91c3-2f78-162a-1c1c4fa7e386@amd.com> (raw)
In-Reply-To: <048964e8-179f-de7b-1190-831779d9911f@amd.com>

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


  parent reply	other threads:[~2023-02-28  4:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01  8:02 [PATCH V2 0/3] sched/numa: Enhance vma scanning Raghavendra K T
2023-02-01  8:02 ` [PATCH V2 1/3] sched/numa: Apply the scan delay to every vma instead of tasks Raghavendra K T
2023-02-03 10:24   ` Peter Zijlstra
2023-02-04 17:19     ` Raghavendra K T
2023-02-01  8:02 ` [PATCH V2 2/3] sched/numa: Enhance vma scanning logic Raghavendra K T
2023-02-03 11:15   ` Peter Zijlstra
2023-02-03 11:27     ` Peter Zijlstra
2023-02-04 18:18       ` Raghavendra K T
2023-02-04 18:14     ` Raghavendra K T
2023-02-07  6:41       ` Raghavendra K T
2023-02-27  6:40         ` Raghavendra K T
2023-02-27 10:06           ` Peter Zijlstra
2023-02-27 10:12             ` Raghavendra K T
2023-02-28  4:59       ` Raghavendra K T [this message]
2023-02-01  8:02 ` [PATCH V2 3/3] sched/numa: Reset the accessing PID information periodically Raghavendra K T
2023-02-03 11:35   ` Peter Zijlstra
2023-02-04 18:32     ` Raghavendra K T

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=7ecb1d90-91c3-2f78-162a-1c1c4fa7e386@amd.com \
    --to=raghavendra.kt@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=bharata@amd.com \
    --cc=david@redhat.com \
    --cc=dishaa.talreja@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rppt@kernel.org \
    /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