From: David Hildenbrand <david@redhat.com>
To: Ryan Roberts <ryan.roberts@arm.com>, Barry Song <21cnbao@gmail.com>
Cc: Will Deacon <will@kernel.org>,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-arm-kernel@lists.infradead.org,
Barry Song <v-songbaohua@oppo.com>,
Ard Biesheuvel <ardb@kernel.org>,
John Hubbard <jhubbard@nvidia.com>,
Mark Rutland <mark.rutland@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [PATCH RFC] mm: arm64: advance pte for contpte_ptep_set_access_flags
Date: Thu, 5 Sep 2024 10:10:05 +0200 [thread overview]
Message-ID: <0e375929-9765-4c30-84a2-b5e016f51bdd@redhat.com> (raw)
In-Reply-To: <c967648a-35a5-4c43-95e1-934cccf3d082@arm.com>
On 05.09.24 09:20, Ryan Roberts wrote:
> On 05/09/2024 04:27, Barry Song wrote:
>> On Thu, Sep 5, 2024 at 3:50 AM Ryan Roberts <ryan.roberts@arm.com> wrote:
>>>
>>> On 04/09/2024 16:13, Will Deacon wrote:
>>>> (Adding Ryan, since you're asking him a question!)
>>>
>>> Thanks, Will!
>>>
>>> Afraid I don't do a good job of monitoring the list; I'm guessing there are
>>> automated ways to filter for mentions of my name so I catch this sort of thing
>>> in future?
>>
>> It's not your fault. I just realized that, for some unknown reason, I forgot to
>> CC you.
>
> No worries. I was just asking if there is a general approach that people take to
> monitor mail that they are not explicitly cc'ed on, but I guess that's a bit off
> topic.
I do something slightly different: I filter mails based on keywords. For
example, whenever a patch contains page_mapcount(), folio_mapcount(),
folio_mapped(), ... it gets put into a separate "mapcount" folder :)
Same regarding file names.
For you, it would probably make sense to filter for contpte or sth like
that :)
[...]
>>>
>>> The code is correct and working as intended, AFAICT. But I accept that this is
>>> not exactly obvious. I'd be happy to Rb your proposed change if you feel it
>>> clarifies things.
>>
>> If this is the case, I'd rather add some comments instead in v2?
>>
>> diff --git a/arch/arm64/mm/contpte.c b/arch/arm64/mm/contpte.c
>> index a3edced29ac1..55107d27d3f8 100644
>> --- a/arch/arm64/mm/contpte.c
>> +++ b/arch/arm64/mm/contpte.c
>> @@ -421,6 +421,12 @@ int contpte_ptep_set_access_flags(struct
>> vm_area_struct *vma,
>> ptep = contpte_align_down(ptep);
>> start_addr = addr = ALIGN_DOWN(addr, CONT_PTE_SIZE);
>>
>> + /*
>> + * We are not advancing entry because __ptep_set_access_flags()
>> + * only consumes access flags from entry. And since we
>> have checked
>> + * for the whole contpte block and returned early, pte_same()
>> + * within __ptep_set_access_flags() is likely false.
>> + */
>> for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE)
>> __ptep_set_access_flags(vma, addr, ptep, entry, 0);
>
> LGTM:
>
> Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
>
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
prev parent reply other threads:[~2024-09-05 8:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-31 8:35 Barry Song
2024-08-31 9:54 ` David Hildenbrand
2024-08-31 10:06 ` Barry Song
2024-09-04 15:13 ` Will Deacon
2024-09-04 15:50 ` Ryan Roberts
2024-09-05 3:27 ` Barry Song
2024-09-05 7:20 ` Ryan Roberts
2024-09-05 8:10 ` David Hildenbrand [this message]
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=0e375929-9765-4c30-84a2-b5e016f51bdd@redhat.com \
--to=david@redhat.com \
--cc=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=jhubbard@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=mark.rutland@arm.com \
--cc=ryan.roberts@arm.com \
--cc=v-songbaohua@oppo.com \
--cc=will@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