From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8D70C54E55 for ; Tue, 5 Mar 2024 09:14:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6D5DB6B00A0; Tue, 5 Mar 2024 04:14:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 685F56B00AB; Tue, 5 Mar 2024 04:14:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 573C66B00AE; Tue, 5 Mar 2024 04:14:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 48C3B6B00A0 for ; Tue, 5 Mar 2024 04:14:09 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 243FDC0506 for ; Tue, 5 Mar 2024 09:14:09 +0000 (UTC) X-FDA: 81862423818.25.F56C7C7 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf01.hostedemail.com (Postfix) with ESMTP id 70E2340014 for ; Tue, 5 Mar 2024 09:14:07 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf01.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709630047; a=rsa-sha256; cv=none; b=Jg2Jyr0hxN7ZdrC32m5jNAeRQvnCgLu8W3R0Lt+JIM82JdSJbewWCvZoPGjYoTBXnLfRdO ve66RCWOHtw6NDU044q/CGb+YQlLEiHaNA3Az16DGyXva1/XCWmR7CzeF1g6CUXCdWtHnF TiXYmd+j4Nb9DEY1W+8ZiexZZVPrLtU= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf01.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709630047; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ggm9X455liQFhnPdohPKc1wa4/sZT8HFTyvkvd48gcE=; b=I/gbgxdLRL2yBNUOUFI+gKf1Hk5vS1RT8hiEz/eWsSqsP76hp9gEXBAkpzTPQp7RPCdICD yk0d8hAIgV4YrFyu+GpCBv9raubWqd2v5jI4GvdedIgjSqWTwgtOA/R4SybOx4BTuUy9MX r//ljo+IUxlLSLE64SGEEYfxdwTYq28= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1CB6D1FB; Tue, 5 Mar 2024 01:14:43 -0800 (PST) Received: from [10.57.68.162] (unknown [10.57.68.162]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5F47D3F762; Tue, 5 Mar 2024 01:14:05 -0800 (PST) Message-ID: <2297b2cf-b854-47c8-bdce-6210d0a61c79@arm.com> Date: Tue, 5 Mar 2024 09:14:03 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] arm64/mm: Improve comment in contpte_ptep_get_lockless() Content-Language: en-GB To: David Hildenbrand , Catalin Marinas Cc: Andrew Morton , Mark Rutland , John Hubbard , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org References: <20240226120321.1055731-1-ryan.roberts@arm.com> <20240226120321.1055731-3-ryan.roberts@arm.com> <089f689d-f8dd-48ba-b6b0-6f91aa3b86f1@arm.com> <1299bd16-9171-407b-9882-db952db03b13@redhat.com> From: Ryan Roberts In-Reply-To: <1299bd16-9171-407b-9882-db952db03b13@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 70E2340014 X-Stat-Signature: suos1u667k86oihxa47r35ahftxseo93 X-Rspam-User: X-HE-Tag: 1709630047-43329 X-HE-Meta: U2FsdGVkX18dzF65e0n+DihqtoDFDfgo+97lS1BbSFut0zJT3SIkeI46QixvQP2zV0jXF1Tc3ETyyClS5SAP/9vMcmjvOjRQTjqRwf9dRLTw1/zauOiFbmV/VLjZxg60hDfeHkWSN2ZH/sU5N0W3S5xxVP2r1bRlei/1y2N5SYtNV+jzknvwyz/w3/pQ033mNsW7rnEc6MxPx7e+FGxVRAtGJMuW9BTu+35mgfIRN0Iz798nRmK+Y+BihU9QFs6nGa+4poDd7qXxIo/Ye943iDA0wfo+EhJjc3mCXOXAZeDVE6ZObNZz1vZkfr+FqOdHn8huOV5ZYGx59xSaTVYdnXj5gqna7G3jwYuIOmicg8FnxmC3FPENrTM+LboSzGfRCPbwJnpPUv/DCJrf597BdlAtSdHbv+yge0Y/pAQ3AcryQhmdOV5JyIqM967yYpOPz95ut9Ux+g1M/lTkolbEz1Pz6Cik1SDKUc1OTP3bXuJw0vH4bgxSYmgatvZti20upDPl98/SS3C+LVb11SnD8QjmD8abfa+kOBueLjBceyJ8cy8OQOOAOsHzi7L+jMoNsrOdLvzaOhOnaqHMXaxANpDKhYaR6cHolIxZ9pNkRJ5BLSHkUhuzkI1CTOIeDT2qoWWUod001H06LkF75NaJsp0zft14GaiyrgAlRbwMlpc4uIpzR0I/I+JlkOND1gQWuyJXUoVWSOvGipffsru10zAMl0s6huet+9/XzIb91XFHGkcCELk20prIbLzqls5dexKYLaX8fP1FqYbQM10uomWia5zT4M8/JhlZR08ZbUUqk/tT0uZL/Bgtoyf9skRei7OSD7ktKQrP+iSuRWTsjlXTxFQsq9DqU7fOmTFaJGi8HmOA1PD/MraJAK+8xDQ5W1h2p04iYho= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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 >>>>>> --- >>>>>>   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 >> >> 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.