From: Wei Yang <richard.weiyang@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Wei Yang <richard.weiyang@gmail.com>,
david@kernel.org, ljs@kernel.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 03:46:29 +0000 [thread overview]
Message-ID: <20260625034629.nmgdwl2c4luwod77@master> (raw)
In-Reply-To: <20260624131457.ac81fbac373f78aa80a516e3@linux-foundation.org>
On Wed, Jun 24, 2026 at 01:14:57PM -0700, Andrew Morton wrote:
>On Wed, 24 Jun 2026 08:23:59 +0000 Wei Yang <richard.weiyang@gmail.com> wrote:
>
>> The kernel test robot reported a build failure on the parisc architecture
>> when expanding HPAGE_PMD_NR in check_pmd().
>>
>> mm/page_vma_mapped.c:142:13: note: in expansion of macro 'HPAGE_PMD_NR'
>> if ((pfn + HPAGE_PMD_NR - 1) < pvmw->pfn)
>> ^~~~~~~~~~~~
>>
>> The config [1] in report link shows neither TRANSPARENT_HUGEPAGE nor
>> HUGETLB_PAGE is defined. Then trigger the BUILD_BUG.
>>
>> Fix it by define check_pmd() under CONFIG_TRANSPARENT_HUGEPAGE.
>
>hm,
>
>#ifdef CONFIG_PGTABLE_HAS_HUGE_LEAVES
>#define HPAGE_PMD_SHIFT PMD_SHIFT
>#define HPAGE_PUD_SHIFT PUD_SHIFT
>#else
>#define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
>#define HPAGE_PUD_SHIFT ({ BUILD_BUG(); 0; })
>#endif
>
>> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
>> /* Returns true if the two ranges overlap. Careful to not overflow. */
>> static bool check_pmd(unsigned long pfn, struct page_vma_mapped_walk *pvmw)
>> {
>> @@ -145,6 +146,12 @@ static bool check_pmd(unsigned long pfn, struct page_vma_mapped_walk *pvmw)
>> return false;
>> return true;
>> }
>> +#else
>> +static bool check_pmd(unsigned long pfn, struct page_vma_mapped_walk *pvmw)
>> +{
>> + return false;
>> +}
>> +#endif
>
>I'll leave it to others to decide if this is the most appropriate fix.
>
>Sashiko had an off-topic complaint about the surrounding code:
> https://lore.kernel.org/oe-kbuild-all/202606240042.ffPsEXVc-lkp@intel.com/
I see this robot reply, but not see the Sashiko comment.
How can I view Sashiko's commnet?
--
Wei Yang
Help you, Help me
next prev parent reply other threads:[~2026-06-25 3:46 UTC|newest]
Thread overview: 5+ 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 [this message]
2026-06-25 4:59 ` Andrew Morton
2026-06-25 6:41 ` 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=20260625034629.nmgdwl2c4luwod77@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