From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DFFD25B09B for ; Thu, 2 Jul 2026 16:55:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783011327; cv=none; b=YEfy5FPjBMdpNrvn8+o9xNtAMMJqjtfEEN7H/6YGxGCzBhWIH4sV28J4j3ni4iHApEo7dCDjrY66DHfK7breCCVyUf6YOcuR1DyAIaEg0CPX4YHIfLrlxoDFXMni+ALx6TjPbtF0sK+C9kcelMSU687W8/V06NO8XX1NWbNLggo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783011327; c=relaxed/simple; bh=vx+MgJDVA8SzdG9Hy/7tXuovn+KvH18iefvEhy6Mehc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Jkye65wPo1LzYuTgA18yvMqUzvNdUjZwfuZFLpmzOrrkX20zlTvgKIpPiludTURrZvHwgP2knrIpM6NjxIEsnv6jqQmV+zTVUuYIF/LA4A2T1x7dHZFEtZVvTGbmJYbgQapWhBkNZq8kssb108d3x/HTSVlcuaxy4FvQju6YGKw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cJxHExrR; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cJxHExrR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 906031F00A3A; Thu, 2 Jul 2026 16:55:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783011326; bh=j/PPcJVBFu3B9JSbXz7pt6mPU/DAMOYM8wrcrC1rScs=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=cJxHExrRfdCPy02rzL8s34i4tnK3DoynY8+HBa5+YHG5enxIgHa/2K9jy9YTQ1UMl XgMuN8hpiXZtKlE+8JNvX3k5cUrGvwXZ55AHYugYE3PwZHuwWiwQQmJffm8HIOTfMd UeVkcr8EBDibmJtWZ438QD8kVDL5NHJmA/S+nA2+PcYNkbwkwHuJRibMaMh0GR0FFj 3J4QNFEHbqvSfXvT8it8dhUnjsiT5gPmCL4eR29ITbSR6WM03gn/6m06+Acdewf3Zn 8xbmU5+tkVBS+WuAt5SFUcdI0hbJW5RwaGMVbBeHyd87P9zevgwgh02cjB3REGD39M 2dUCyW70ohyMw== Date: Thu, 2 Jul 2026 17:55:13 +0100 From: Lorenzo Stoakes To: "David Hildenbrand (Arm)" Cc: Usama Arif , Andrew Morton , chrisl@kernel.org, kasong@tencent.com, ziy@nvidia.com, linux-mm@kvack.org, ying.huang@linux.alibaba.com, Baoquan He , willy@infradead.org, youngjun.park@lge.com, hannes@cmpxchg.org, riel@surriel.com, shakeel.butt@linux.dev, alex@ghiti.fr, kas@kernel.org, baohua@kernel.org, dev.jain@arm.com, baolin.wang@linux.alibaba.com, npache@redhat.com, "Liam R. Howlett" , ryan.roberts@arm.com, Vlastimil Babka , lance.yang@linux.dev, linux-kernel@vger.kernel.org, nphamcs@gmail.com, shikemeng@huaweicloud.com, kernel-team@meta.com Subject: Re: [PATCH 6/6] mm: rename ARCH_ENABLE_THP_MIGRATION to ARCH_SUPPORTS_PMD_SOFTLEAF Message-ID: References: <20260630164143.1595669-1-usama.arif@linux.dev> <20260630164143.1595669-7-usama.arif@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Jul 01, 2026 at 10:03:21PM +0200, David Hildenbrand (Arm) wrote: > On 6/30/26 18:34, Usama Arif wrote: > > CONFIG_ARCH_ENABLE_THP_MIGRATION started life gating just PMD-level > > migration entries, but has grown to gate the entire PMD-level softleaf > > machinery: migration entries, device-private entries, and soon swap > > entries. > > device-private really relies on migration support. > > See do_huge_pmd_device_private() where we migrate back to CPU memory. > > The whole concept is pased on migration. So that's why it currently makes sense. > > So "has grown to" is not quite accurate. It's a different story with swap > entries (that can exist even without migration support). > > > > Rename CONFIG_ARCH_ENABLE_THP_MIGRATION to CONFIG_ARCH_SUPPORTS_PMD > > _SOFTLEAF to make this clear. This is a pure rename: the set of > > selecting architectures (x86, arm64, s390, riscv, loongarch, and > > powerpc on PPC_BOOK3S_64) and the gating semantics are unchanged. > > Hm, that makes me wonder what it would take to make this all just be implicitly > supported by CONFIG_TRANSPARENT_HUGEPAGE. > > Looks like someone would have the courage to touch stuff like arc, mips and > sparc64 (+arm and x86, but that's less of a concern :) ). > > So yeah, renaming the config option makes sense. The config space is the wild west. > > We have > > PGTABLE_HAS_HUGE_LEAVES > > and stuff like > > HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD > HAVE_ARCH_SOFT_DIRTY > ARCH_HAS_GIGANTIC_PAGE > ARCH_HAS_PTE_SPECIAL > > We do have a limited number of "SUPPORTS" (which is longer than HAS), but I > would either use > > > ARCH_HAS_PMD_SOFTLEAVES > > or > > HAVE_ARCH_PMD_SOFTLEAVES Yeah it'd be GREAT to simplify all this! > > > Apart from that LGTM. Can I just say I love this patch in general though? Softleaf all the things :)) > > -- > Cheers, > > David Cheers, Lorenzo