From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (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 1E7B93EA946 for ; Thu, 25 Jun 2026 16:18:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782404308; cv=none; b=lehjyQ+S9j26vx+gUbBCeGAln81ioQQE4QnJ8YwL6DN1ep4FdJ1ffXevwH++iszr5G49fd4ICK8Vrwz6ikpKyMHKI49oCKTcaCydk1iw541EUDfPbt61asO9kSYC5FkikLWpL6U5M+T3C7Esbcm5wo2hbPThnCnLRg0dgyWpXGA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782404308; c=relaxed/simple; bh=HFcS3GYawOluBrBMqwGLcZOEOsQtaLPWbpw7PkTThgM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=h7C/4Ji8wWwuB8UK581XeQ5yI9zbQlB6vBUE4UrQpobSpTSflxa2sGQQS/EfYvoH/t9OGAPSL6vW02EktUO3ROI8i0hx3XMEX1tklC67GjwnmrYhvoHIlmufAzp3d4+OiIupuT+xcm2nn6roI0WPRf24gU+LNAmH9MXb8OOEvr0= 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=Xafq31+S; arc=none smtp.client-ip=209.85.208.41 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="Xafq31+S" Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-69690062350so1831479a12.0 for ; Thu, 25 Jun 2026 09:18:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782404302; x=1783009102; darn=vger.kernel.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=uqHpmuK4pkMoXE019QC10uQ8T4IH5rkVaD+e94INi8Y=; b=Xafq31+SI3hLiJeCxZDb9X9wFZ3ZQdncgIwR6+7LB29Ec8BewpkSQUxSEM9kcGGigD nJh9jc3gS3HjkHEmeWJO1Pghytc9g/L5VfFva7+NzLbJ3pTFJp6kX3joOWndNQwJJMuP C5QA4AqtyGc85ZZFBzGdj5OqmjIUwTvUvGARU23ZZosfoWu7MNbd0FSZrsp+1rThi+im i7Zk66EZ4E5+ZwsqoOcrZPTe518np+NBFHMG4yNg6XpPOGL9qqeRPwEnNMP4MZfILOA4 Cer5VJJIT71tWZ3QmTONT8B8SSbSs9L4b3CYWKl1xTyTe14tV3HCSuwa5nSj0iKQbWNW MVnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782404302; x=1783009102; h=user-agent:in-reply-to:content-disposition:mime-version:references :reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uqHpmuK4pkMoXE019QC10uQ8T4IH5rkVaD+e94INi8Y=; b=FrCTitONqBlJ8SlF0VH1UssuOvkz33jQnScYGBF+szHfwh6keOvOKudev3EGULk4uo 0ad+ZOq+fEVzPo8evQbwTfDeXIBV1XJ4uOlirnvUngdBTRJtKLZqOFLbt9PST5Ni6LSW 9XuRocGbKr99XX4RntObIj4/XsI46URzsPtzy84VsJlHW9CptwKMTs4dsLaWAC1olGJH AXXswlomhBNwXW+HeSJgQ/MJtg9SquPQ3XEAsp5uYI2bVVbIhiD15a4gNGecA4FHEv8n WAaKCn5wMTHIZHCCgfGTYQjU2m/TBoMO1bc0BFmTjpZZ4+s/94HCDx50CMNJqyxG+vjW tLAQ== X-Forwarded-Encrypted: i=1; AHgh+Ro0v2kNFIajYQcTPjNxniXNoWa4dJfsOQy/QtjaVrbRf1nm0dqLsudlgeMNKt7gu4IqUdBA/w2MgwwzPMw=@vger.kernel.org X-Gm-Message-State: AOJu0YwtU4eqaDCvRHv2mdIEZVWuYgGBTlcD+rtwgP/LtNKz2gt440Ke cBzTddZ7XtI08quCF6Hrkygb25GZuETfdfNjNAdu/3BOpFPzMvbK7lqz X-Gm-Gg: AfdE7cmc+hxx7oRkeXOOj+PCQ+ayuX7RD8VX2nWbVy4lkegxeJV8mSc5xmBBaTRc71x yklPit6mukBQLjJkw5hgLATwNjmTbzbDvTjqCA7BiW23937v1GyujP5jLyOmtENwGZiIXO1dptA LxzFTELEc5qHR6UmtZnIZhz4kTw2ZS/KCpJqy++Dsw1j/EE0oVrAfb+5kqh1mu3AfWx54Pbh83o q5z4Ka66rQkfIbLBueYZ9Z4HsNzdHRApjv0d59vuGRG5395yKabz+9Zo+uk4vCvz+GsF5pSyg33 L/J4E7GARE4IQhz8YcNGS+6H1nzfN5QYLEUU1T7on9AS3jDL0k3XAShXsTyiJtnmIdKc2EW6v5V agqWeA0WJLx+al2T9LG6lUPKSI8/GrvKyOKbTYOwO92i1GKcqYKqHgOJDKNOxknsJvmoCaDL5s/ zwew/EnHVTsN4BKyEO2ycoBQ== X-Received: by 2002:a17:907:969e:b0:c0d:8c04:92d0 with SMTP id a640c23a62f3a-c1206187628mr260188666b.49.1782404301596; Thu, 25 Jun 2026 09:18:21 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c11fbe5f249sm221917566b.50.2026.06.25.09.18.20 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Jun 2026 09:18:20 -0700 (PDT) Date: Thu, 25 Jun 2026 16:18:20 +0000 From: Wei Yang To: "David Hildenbrand (Arm)" Cc: Lorenzo Stoakes , Wei Yang , akpm@linux-foundation.org, riel@surriel.com, liam@infradead.org, vbabka@kernel.org, harry@kernel.org, jannh@google.com, willy@infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, lance.yang@linux.dev Subject: Re: [PATCH] mm/page_vma_mapped: guard check_pmd() with CONFIG_TRANSPARENT_HUGEPAGE Message-ID: <20260625161820.bkxl23ugqjd6tcld@master> Reply-To: Wei Yang References: <20260624082359.2869-1-richard.weiyang@gmail.com> 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: User-Agent: NeoMutt/20170113 (1.7.2) On Thu, Jun 25, 2026 at 04:30:33PM +0200, David Hildenbrand (Arm) wrote: >On 6/25/26 16:02, Lorenzo Stoakes wrote: >> On Thu, Jun 25, 2026 at 03:49:59PM +0200, David Hildenbrand (Arm) wrote: >>> On 6/25/26 15:45, Lorenzo Stoakes wrote: >>>> >>>> Let me first say that I absolutely hate that we continue to support museum >>>> piece architectures to the point that we have to make changes in core code >>>> to accommodate them. >>> >>> I wonder why we shouldn't be able to trigger that on other archs with >>> !CONFIG_TRANSPARENT_HUGEPAGE ? >> >> I think this should just use CONFIG_PGTABLE_HAS_HUGE_LEAVES, since that's the >> property that literally defines whether check_pmd() makes any sense. > >I stated earlier (when motivating a proper cleanup of this) that I detest >pmd_trans_huge(). And yes, like I did in foliowalk, we should just check for >IS_ENABLED(CONFIG_PGTABLE_HAS_HUGE_LEAVES) instead. > >Long story short: Wei's fix needs work, upstream is fine. > Ok, I didn't notice this is caused by my fix because pmd_trans_huge() == false and check_pmd() skipped, but the newly add code doesn't. So I should merge this with the pmd_is_device_private_entry() fix patch. And should wrap it with CONFIG_PGTABLE_HAS_HUGE_LEAVES instead of CONFIG_TRANSPARENT_HUGEPAGE. But one more thing, I took a look into the robot test config and notice ARCH_ENABLE_THP_MIGRATION is not defined either, which depends on TRANSPARENT_HUGEPAGE (where pmd_trans_huge() depends). This means pmd_is_device_private_entry() == false on this test environment. And in theory it is false if TRANSPARENT_HUGEPAGE is not set. So check_pmd() should be skipped too? Hope I am not too silly. >-- >Cheers, > >David -- Wei Yang Help you, Help me