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 8118EC54E41 for ; Tue, 5 Mar 2024 09:13:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 17E306B00AE; Tue, 5 Mar 2024 04:13:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 12F6E6B00AF; Tue, 5 Mar 2024 04:13:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 01C876B00B0; Tue, 5 Mar 2024 04:13:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E6DEF6B00AE for ; Tue, 5 Mar 2024 04:13:12 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id C4D3D40D3B for ; Tue, 5 Mar 2024 09:13:12 +0000 (UTC) X-FDA: 81862421424.22.97DC2AB Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf30.hostedemail.com (Postfix) with ESMTP id 26CB980012 for ; Tue, 5 Mar 2024 09:13:10 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=none; spf=pass (imf30.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709629991; 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=TJRIxZmPNWEpfnRKGCRXa5axvnsojBq/j/GIY2tntt2B7v+a/YKw4m2+yFcGbBT9OlPeWE 5ibq7TGk+Ojpe17avEjIzU/mxFBGuGU8R1f83NRYMtj/EDpKVqPGkqpmsICn6xcNYtkn4t x9ZWIz5Q0NXUwx5lEq8Blg5rGIuhNR4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709629991; a=rsa-sha256; cv=none; b=U3oNFFN+7ftr34XTXBf8F09NnBmETYXQKPFqrslXCBnzKEdVklSk/MHtFsiqpP5JHLY4cd 8+4SeXQauaD19o2/OM6gaK8IdV5YQAY4LJHix5jyyoFtuIK1c+0Ts33ypncfCODmU0lqGi aXQEVLLCO8BQ3+n92dzNw6cd3J2D8eU= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=none; spf=pass (imf30.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com; dmarc=pass (policy=none) header.from=arm.com 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 01FFC1FB; Tue, 5 Mar 2024 01:13:47 -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 50E193F762; Tue, 5 Mar 2024 01:13:09 -0800 (PST) Message-ID: Date: Tue, 5 Mar 2024 09:13:07 +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-Queue-Id: 26CB980012 X-Rspam-User: X-Stat-Signature: suos1u667k86oihxa47r35ahftxseo93 X-Rspamd-Server: rspam03 X-HE-Tag: 1709629990-712135 X-HE-Meta: U2FsdGVkX1/uo84VnefM4c4THAWBx9tFK74MoGSfCkkwgTg2M9uKYo7qeKs/UjundmyX4lfa7sC93gQNSNADm6BaF52TtJsFSsCrUAftHrCkqcSwJn2wCX+oU/9fsy/WZRUNz0dbjyqYIXD+BzJnUfXL3p7TKYRcKS4XH0RvsMAehN8PhQK+s5pqnmTzBpYsP8r7hYYZTqJZ3GEMU2cLA9tBG0m5k86m6v8+zDTAeKhh6d+CA9BPBc/Or5dOZGUeBKWh1KsdoITiYbilv3lOCjA+wodg20SEp/6oD/J/GpPBcwiqVpXyio1NGkSnHNiNoXrGOd/86kmoGjez7CqUlLbXwZFnujL/OWrZLlqUZmMbxiGDRAafujVo5AN0aKAlb9ftDV1UsRcoX3+vGE2EVq2V+YO2OMrlMzL1ILpUqyLdEHqPSLB70W2Y510lldXA0dsti0BYXFEFJW3axi4xprgHWUPN5wrEa8wf2mO/R15cTDDO4N6sOW47RmgyjmzBehGniVcaCeKVBrmIk1fYN1Vge7JEDusGzLBdRGnhYj2OVEIoVv7W/vnRh7Lk6iokinrAKoMbhBmTuV6iimekvySx1f76nHPdL2L4OtecqcPYnu32nLIsfhNKkVAsQVaTyiGKIoCCHcnFgHhdmAStBovupy+pHt558nTDNWf4YHWmuSHTyvWggT283C+KMSqf3cwFPm2BoKDGlitXlSPOQ7xY7gbf1irHTc1YwhVpn8JsIr5Qh06+Qag78fOl4xVj2duNhOfpVn+0ao8rd2IKXOBbnJRi/rusz79bCxwDCgw+ZdkjVqCEqrifAKcbV5JM8nRY4/fudVpLBNqUjrY0lQiJ7Z9XV045BDER5ySQQzJEjWqICEc3/znEaR7vY9BEyN7gFuR0mAI= 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.