From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A6DB2ECD19 for ; Wed, 5 Nov 2025 20:11:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762373514; cv=none; b=YiyZQ3Feu9eFsyghXf4pIXQBwUP1cm347GL73DyA/cWC8cJi63eb3UfB0QVVqrFczkwyqjsHHptx8tFeSUIUEPTeyfBZ9jyaONruiY0jFDR58yd1JGkwh3mvzpZ32iKUIATf5CDpy4E0Jp1D3YKcjT+CWXF/x58BxeQj1sdVZ0k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762373514; c=relaxed/simple; bh=NFp/V37n2JlPJmM4Ml3ZxXNzYR6pZ1s9aep17sOBoWc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=lDwxiYR7uQted23YJTKGVKfYUSoRqbHqd+rLJgU0XdkJVRuVBTdrPOecaO/SzPbWI4hkTbrQRtZcPmtUNN4kNTFYewvgCiKN8TsRHD1iY0KkfnxVVRon/U9PI4b3Ek/8qEd2sbTNKP4p2Wb6g7toYCDgHZLd85HLf/13lhZFtX4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=G3qaftoK; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="G3qaftoK" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-477563e28a3so1850105e9.1 for ; Wed, 05 Nov 2025 12:11:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762373511; x=1762978311; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=TumQxLyft0zt3kRPj4Gvce84mIv/VXDVvsyQGcXgpBE=; b=G3qaftoK+YdtvWNtyjNFuwkMQyswW02+5KSfVUblB/mKLciKFoV5m+wKCH/awie5Q8 HgCnNlsiWSziPPivGXCApLVpm+sPhXR7Cd3yBI0TcWhoS/YeUUAK0r8E4hndWs1/cel5 R3vakXMGZX9GAUlVSZet7XNFgUfitgFuhifBR4xuIhJvRZ2z+Fbt/24ea3+JCc7zEoIE uRgRKcU0LQjbNmbaGWti3+Gxu3tc2jgE7stWFy2QP1rUUa7fzsRXdH/fSYkXCvHSpCPG ZMv56OfCT+f9bEphoMsxyZTazxHQ4FsMYYXIzql8Fd+bGbwoizcROk/aJfP0ETo/cko5 +6ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762373511; x=1762978311; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TumQxLyft0zt3kRPj4Gvce84mIv/VXDVvsyQGcXgpBE=; b=qiyfm1/lcZVhUAsAi0/h2DEEwKv9PaOBWxqQ7Pf8dedXYV8f4wpldd3jE+Vc8ktm6v J5uVfFb/+te5WVY5nAr9U5iN63mLb4P6C0/RccqN69DtZsKonUe3tHzFFPttUkLsbM2B DnzWSzzz8ptRY0MQCFGhg20rdvE1RS7c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m0X+42uA== X-Received: by 2002:a05:600c:590e:b0:477:632c:47bc with SMTP id 5b1f17b1804b1-477632c4936mr892375e9.6.1762373510748; Wed, 05 Nov 2025 12:11:50 -0800 (PST) Received: from ?IPV6:2003:d8:2f30:b00:cea9:dee:d607:41d? (p200300d82f300b00cea90deed607041d.dip0.t-ipconnect.de. [2003:d8:2f30:b00:cea9:dee:d607:41d]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47755938f45sm51392505e9.4.2025.11.05.12.11.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Nov 2025 12:11:49 -0800 (PST) Message-ID: <7f507cb7-f6aa-4f52-b0b5-8f0f27905122@gmail.com> Date: Wed, 5 Nov 2025 21:11:45 +0100 Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 02/16] mm: introduce leaf entry type and use to simplify leaf entry logic To: Lorenzo Stoakes , Gregory Price Cc: Matthew Wilcox , Andrew Morton , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Sven Schnelle , Peter Xu , Alexander Viro , Christian Brauner , Jan Kara , Arnd Bergmann , Zi Yan , Baolin Wang , "Liam R . Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Muchun Song , Oscar Salvador , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Matthew Brost , Joshua Hahn , Rakie Kim , Byungchul Park , Ying Huang , Alistair Popple , Axel Rasmussen , Yuanchu Xie , Wei Xu , Kemeng Shi , Kairui Song , Nhat Pham , Baoquan He , Chris Li , SeongJae Park , Jason Gunthorpe , Leon Romanovsky , Xu Xin , Chengming Zhou , Jann Horn , Miaohe Lin , Naoya Horiguchi , Pedro Falcato , Pasha Tatashin , Rik van Riel , Harry Yoo , Hugh Dickins , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, damon@lists.linux.dev References: <2c75a316f1b91a502fad718de9b1bb151aafe717.1762171281.git.lorenzo.stoakes@oracle.com> <373a0e43-c9bf-4b5b-8d39-4f71684ef883@lucifer.local> From: "David Hildenbrand (Red Hat)" Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 05.11.25 21:05, Lorenzo Stoakes wrote: > On Wed, Nov 05, 2025 at 03:01:00PM -0500, Gregory Price wrote: >> On Wed, Nov 05, 2025 at 07:52:36PM +0000, Lorenzo Stoakes wrote: >>> On Wed, Nov 05, 2025 at 02:25:34PM -0500, Gregory Price wrote: >>>> On Wed, Nov 05, 2025 at 07:06:11PM +0000, Matthew Wilcox wrote: >>> I thought about doing this but it doesn't really work as the type is >>> _abstracted_ from the architecture-specific value, _and_ we use what is >>> currently the swp_type field to identify what this is. >>> >>> So we would lose the architecture-specific information that any 'hardware leaf' >>> entry would require and not be able to reliably identify it without losing bits. >>> >>> Trying to preserve the value _and_ correctly identify it as a present entry >>> would be difficult. >>> >>> And I _really_ didn't want to go on a deep dive through all the architectures to >>> see if we could encode it differently to allow for this. >>> >>> Rather I think it's better to differentiate between s/w + h/w leaf entries. >>> >> >> Reasonable - names are hard, but just about anything will be better than swp_entry. >> >> SWE / sw_entry seems perfectly reasonable. > > I'm not a lover of 'sw' in there it's just... eye-stabby. Is that a word? > > I am quite fond of my suggested soft_leaf_t, softleaf_xxx() We do have soft_dirty. It will get interesting with pte_swp_soft_dirty() :) ptw_softlead_soft_dirty() Well, at least I would understand it.