Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp73643lql; Fri, 12 Apr 2024 04:21:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUbgAf7bg6tFs91VqudAjvoBtYpsL9rx6x3tJRV0XUTcYW+o4hRdfnsrz5DqqPruMGXPf5Mh6sJR6Q7+StXr69qWTlQ1D/UElZHR97RUg== X-Google-Smtp-Source: AGHT+IGbFXbpAFLfRpqeGvo0+HlQ/6x5hJ0S/kUjJTR9+s1heqtMAK9msuWqr2hQ4gy4KIAng7BE X-Received: by 2002:a17:906:d159:b0:a51:d19c:aba8 with SMTP id br25-20020a170906d15900b00a51d19caba8mr1480311ejb.20.1712920899827; Fri, 12 Apr 2024 04:21:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712920899; cv=pass; d=google.com; s=arc-20160816; b=Tfxig5sGS1EbMsvwivhDJfDHOzZb1Uj0BFGDo/uhyfM/YOsc8KFadVYuenKHO8q7Yc lgQWOruvquQpJ5JYwIdUdneLrKW60foo+L7oSWFB5Ua/bUGisLQyujh6ZbdIV02bZDmp C50Z/VsQhOdGrdP9VQdW27GYTR3rWwj3XDYf5JQyyi2vxnbpi77I1ECgAUHjWGLmlgiS qHB50ExulPoYnlwQskNGfaOCPTce3Nf6R8WOLSpNdE/QSF4WAoffdnxAaaM/U2znc8Xs jjRReeuS6lQsEaKEhYpadRP15YPUriQa3bKxLzaSaAqa2vc/zSBI0ts2HMr5mjDySkNE XoFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=USddiEiFMmcmTLvueuP4TP66wot48r1cSKB5SXgylsY=; fh=gmfk4PoPiDC8zIc55sAc/yephYkjEE2WIEquIloK2xI=; b=VVEQgcskfw8Po0jbs4Sd/1UATeJM42iZA6Hq6ZsbcY2YHWMzAVgSBmUUemMu0LDXxd yYl4GCJf27+yZAbI3eh3Dt0Qn5OJ7N1UAmE3OuAUgo4ju8Rm43FN01nF4DXpMzk7lASQ gaR6oPayDC9o7KWED55sOyDsFoyW0ta5jD+ijnIYTnNj8TklFChffg77N80sDaFpUprt ygM9JtYfXHIUCMEDLaG9Jw96qR6rSyFRjnvMpBqsmPRJ3+yoVFAr6+1M1OAHvizDZSS5 mM64j/tMkHFxig7zIhBtpHXy2zxOQ+6MLB2HA/fvpqu089gBh062sVrg8kqY3Mj/CJTC csFA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-142565-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142565-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id hs14-20020a1709073e8e00b00a52231a529esi1416116ejc.654.2024.04.12.04.21.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 04:21:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142565-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-142565-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142565-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 876BE1F23224 for ; Fri, 12 Apr 2024 11:21:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD6FA54901; Fri, 12 Apr 2024 11:21:28 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F3E5053811 for ; Fri, 12 Apr 2024 11:21:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712920888; cv=none; b=Vy6ooktvI6EjAwYgGlx9ZWFVe6UHJRSzPxczmOLZrk4XVgCd0VCaeMKfKBVZt5+RlIaboR/3ixOmrMUOi6IVXmJCyYNkz2Pph7gORmGIffy7Y+X+iJVrzmfO5MvvpG/3kPVqJVqY8NJDGml0HsRr2n0ZAQEuIJjBZbWPu8xqoV4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712920888; c=relaxed/simple; bh=3jQRIBvYfDbKJtXMkzHPOwlwO+7J4akUAJcrsQK44FQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JLvhZDBY5RC3s6ibOx2kF/2Dix0a40YNqvYWazNz6U5UizRE6nyXBVZkOEGc+XJXtFQGZfFi1kWzuRYgsCWTyPt9J4uzxob8pwU9gtEaOPbYV0xKutS8IDUrHl/E5Nrb6Ot1JyQM1lulRLKP+Lj2ZTPcviTYF/cqtJrdS917a3Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=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 632ED339; Fri, 12 Apr 2024 04:21:55 -0700 (PDT) Received: from [10.57.73.208] (unknown [10.57.73.208]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 27AB83F766; Fri, 12 Apr 2024 04:21:24 -0700 (PDT) Message-ID: <84eca849-5da3-4272-ade6-dc0f2b3dc4b2@arm.com> Date: Fri, 12 Apr 2024 12:21:22 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 2/2] mm/arm64: override mkold_clean_ptes() batch helper Content-Language: en-GB To: Lance Yang Cc: akpm@linux-foundation.org, david@redhat.com, 21cnbao@gmail.com, mhocko@suse.com, fengwei.yin@intel.com, zokeefe@google.com, shy828301@gmail.com, xiehuan09@gmail.com, wangkefeng.wang@huawei.com, songmuchun@bytedance.com, peterx@redhat.com, minchan@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20240408042437.10951-1-ioworker0@gmail.com> <20240408042437.10951-3-ioworker0@gmail.com> <3cd1036d-3814-4a10-b6d2-099937ceabc8@arm.com> From: Ryan Roberts In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 12/04/2024 03:09, Lance Yang wrote: > On Thu, Apr 11, 2024 at 9:17 PM Ryan Roberts wrote: >> >> On 08/04/2024 05:24, Lance Yang wrote: >>> The per-pte get_and_clear/modify/set approach would result in >>> unfolding/refolding for contpte mappings on arm64. So we need >>> to override mkold_clean_ptes() for arm64 to avoid it. >> >> IIRC, in the last version, I suggested copying the wrprotect_ptes() pattern to >> correctly iterate over contpte blocks. I meant for you to take it as inspiration >> but looks like you have done a carbon copy, including lots of things that are >> unneeded here. That's my fault for not being clear - sorry! > > My bad. I must have misunderstood your intention. Not at all - it was my bad. wrprotect_ptes() is nothing like what I eventually suggested below, so sorry for the bad steer.