Re: [PATCH RFC v2 14/20] x86: mm: skip pud setup when using generic compile-time folded pagetable
From: Yeoreum Yun
Date: Fri Jul 24 2026 - 08:08:38 EST
On Wed, Jul 22, 2026 at 01:22:04PM -0700, Dave Hansen wrote:
> On 7/22/26 13:18, Yeoreum Yun wrote:
> > Sorry. But do you mean check with cpu_feature_enabled() not with
> > boot_cpu_has()?
> > IIRC, the boot_cpu_has() doesn't use the DISABLE_MASK_BIT_SET() but
> > uses REQUIRED_MASK_BIT_SET() and I don't expect it wouldn't make
> > an optimisation to constant check which is contrast to DISABLE_MASK_BIT_SET().
>
> Ahh, yes. I forgot about that nuance! Moving to cpu_feature_enabled()
> would be great!
When I see again, using cpu_feature_enabled(), this would give a chance
to optimisation when the feature disabled and there would be no harm for
when feature enabled since cpu_feature_enabbled() also fallback to
boot_cpu_has().
So, it might be good to change with cpu_feature_enabled() as we
discussed.
@Dave, Should I send above change separately or include it in this patch?
--
Sincerely,
Yeoreum Yun