[PATCH 2/2] arm64/mm: Improve comment in contpte_ptep_get_lockless()

Ryan Roberts ryan.roberts at arm.com
Mon Mar 4 10:40:07 PST 2024


On 04/03/2024 17:37, Catalin Marinas wrote:
> On Mon, Mar 04, 2024 at 12:54:23PM +0000, Ryan Roberts wrote:
>> On 01/03/2024 18:47, Catalin Marinas wrote:
>>> On Mon, Feb 26, 2024 at 12:03:21PM +0000, Ryan Roberts wrote:
>>>> Make clear the atmicity/consistency requirements of the API and how we
>>>> achieve them.
>>>>
>>>> Link: https://lore.kernel.org/linux-mm/Zc-Tqqfksho3BHmU@arm.com/
>>>> Signed-off-by: Ryan Roberts <ryan.roberts at arm.com>
>>>> ---
>>>>  arch/arm64/mm/contpte.c | 24 ++++++++++++++----------
>>>>  1 file changed, 14 insertions(+), 10 deletions(-)
> [...]
>>> Throughout the callers of this function, I couldn't find one where it
>>> matters. So I concluded that they don't need the dirty state. Normally
>>> the dirty state is passed to the page flags, so not lost after the pte
>>> has been cleaned.
>>
>> I agree we can simplify the semantics. But I think its better done in a separate
>> series (which I previously linked).
>>
>> What's the bottom line here? Are you ok with this comment as a short term
>> solution for now, or do you want something more radical (i.e. push to get the
>> series that does these simplifications reviewed and in time for v6.9).
>>
>> I still believe the current ptep_get_lockless() implementation is correct. So
>> given I have a plan to simplify in the long run, I hope we can still get this
>> series into v6.9 as planned.
> 
> Yes, I'm fine with this patch. Assuming Andrew picked them up:
> 
> Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>

Thanks! Yes, he did - they are in mm-unstable.

> 
> I'd like to get the simplification in as well at some point as I think
> our ptep_get_lockless() is unnecessarily complex for most use-cases.

Yes, I'll keep pushing it. I know DavidH is keen for it.




More information about the linux-arm-kernel mailing list