Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yang <richard.weiyang@gmail.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>,
	Wei Yang <richard.weiyang@gmail.com>,
	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
Date: Thu, 25 Jun 2026 16:18:20 +0000	[thread overview]
Message-ID: <20260625161820.bkxl23ugqjd6tcld@master> (raw)
In-Reply-To: <dd395d30-acf2-4467-8b30-cdf2532f585e@kernel.org>

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


  reply	other threads:[~2026-06-25 16:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24  8:23 [PATCH] mm/page_vma_mapped: guard check_pmd() with CONFIG_TRANSPARENT_HUGEPAGE Wei Yang
2026-06-24 20:14 ` Andrew Morton
2026-06-25  3:46   ` Wei Yang
2026-06-25  4:59     ` Andrew Morton
2026-06-25  6:41       ` Wei Yang
2026-06-25 13:51         ` Lorenzo Stoakes
2026-06-26  0:08         ` Balbir Singh
2026-06-25 13:45 ` Lorenzo Stoakes
2026-06-25 13:49   ` David Hildenbrand (Arm)
2026-06-25 14:02     ` Lorenzo Stoakes
2026-06-25 14:30       ` David Hildenbrand (Arm)
2026-06-25 16:18         ` Wei Yang [this message]
2026-06-25 23:13           ` Wei Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260625161820.bkxl23ugqjd6tcld@master \
    --to=richard.weiyang@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=harry@kernel.org \
    --cc=jannh@google.com \
    --cc=lance.yang@linux.dev \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=riel@surriel.com \
    --cc=vbabka@kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox