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

Ryan Roberts ryan.roberts at arm.com
Tue Mar 5 01:13:07 PST 2024


On 04/03/2024 22:04, David Hildenbrand wrote:
> On 04.03.24 19:40, Ryan Roberts wrote:
>> 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.
> 
> Maybe just sent a v1 (after the merge window?) if there is no further feedback.
> I still want to look into the details, but it's stuck deep in my inbox I'm
> afraid :)

Yep will do! I will also add the final patch to actually remove
ptep_get_lockless() since it is no longer used by the end of the series.




More information about the linux-arm-kernel mailing list