Re: [linus:master] [atomic] 80047d84ee: WARNING:at_include/linux/instrumented.h:#__split_huge_pmd_locked
From: Arnd Bergmann
Date: Tue Nov 03 2026 - 11:58:42 EST
On Tue, Nov 3, 2026, at 17:29, Dave Hansen wrote:
> On 11/3/26 07:43, Andrew Morton wrote:
>
> Heh, same code. Same basic problem. Two different detectors firing.
>
> But I also kinda feel like shooting the messenger on this one. The
> warnings are presumably to help us with performance problems. This is
> old, legacy code that nobody cares about running fast. So they're not
> actually helpful here. I don't think it's the craziest thing, at least
> on x86_32, to just turn the warnings off.
>
> Also, if there are plans to get all the pmd_t's off the stack, maybe we
> should just manually align them for now.
I would still prefer to align the types than the objects, if only
for the reason that the interfaces that operate on the type clearly
expect it to be aligned.
> It wouldn't hurt to make the definitions uglier like:
>
> #define pxx_xchg64(_pxx, _ptr, _val) ({
> _pxx##val_t *_p = (_pxx##val_t *)_ptr;
> - _pxx##val_t _o = *_p;
> + _pxx##val_t _o __aligned(sizeof(_pxx##val_t)) = *_p;
> do { } while (!try_cmpxchg64(_p, &_o, (_val)));
> native_make_##_pxx(_o);
> })
I initially misread the code the same way. However, the warning
here is about _p being misaligned, not &_o, so Sasha's patch
would be the one that aligns the objects.
Arnd