Re: [PATCH v4 35/35] mm, slub: convert kmem_cpu_slab protection to local_lock

From: Sebastian Andrzej Siewior
Date: Tue Aug 17 2021 - 05:34:25 EST


On 2021-08-17 11:31:56 [+0200], Vlastimil Babka wrote:
> On 8/17/21 11:12 AM, Sebastian Andrzej Siewior wrote:
> > On 2021-08-17 10:37:48 [+0200], Vlastimil Babka wrote:
> >> OK reproduced. Thanks, will investigate.
> >
> > With the local_lock at the top, the needed alignment gets broken for dbl
> > cmpxchg.
>
> Right. I wondered why the checks in __pcpu_double_call_return_bool
> didn't trigger. They are VM_BUG_ON() so they did trigger after enabling
> DEBUG_VM.

Without the right debugging enabled

| typedef struct {
| #ifdef CONFIG_DEBUG_LOCK_ALLOC
| struct lockdep_map dep_map;
| struct task_struct *owner;
| #endif
| } local_lock_t;

the struct is just empty.

Sebastian