Re: [PATCH v2 6/6] s390/mm: Allow lazy MMU mode disabling

Christian Borntraeger
2026-04-16T08:22:24Z

Am 16.04.26 um 09:00 schrieb Alexander Gordeev:
> On Thu, Apr 16, 2026 at 07:44:05AM +0200, Heiko Carstens wrote:
>>> @@ -169,6 +185,8 @@ void arch_enter_lazy_mmu_mode_for_pte_range(struct mm_struct *mm,
>>> {
>>> if (!test_facility(13))
>>> return;
>>> + if (!static_branch_likely(&lazy_mmu))
>>> + return;
>>
>> Looks like there is an alternative chicken switch available: remove
>> facility bit 13 from the facility list via kernel command line option.
>>
>> Unless I am mistaken: that should be sufficient and avoids adding more
>> code.
>
> But that would also withdraw multi-IPTE from other unrelated parts of
> the code, e.g. from __kernel_map_pages().

Which is fine. Do not over-optimize for a case that should not be
needed unless we really mess up. This parameter is way too complicated to ever
be set/unset by a customer.