Thread (47 messages) 47 messages, 3 authors, 2021-08-04

Re: [PATCH v3 31/35] mm, slub: optionally save/restore irqs in slab_[un]lock()/

From: Mel Gorman <hidden>
Date: 2021-07-29 15:43:08
Also in: lkml

On Thu, Jul 29, 2021 at 03:21:28PM +0200, Vlastimil Babka wrote:
For PREEMPT_RT we will need to disable irqs for this bit spinlock. As a
preparation, add a flags parameter, and an internal version that takes
additional bool parameter to control irq saving/restoring (the flags
parameter is compile-time unused if the bool is a constant false).

Convert ___cmpxchg_double_slab(), which also comes with the same bool
parameter, to use the internal version.

Signed-off-by: Vlastimil Babka <redacted>
On arm64 allmodconfig, the following build warning was new

 In file included from ./include/linux/spinlock.h:54,
                  from ./include/linux/mmzone.h:8,
                  from ./include/linux/gfp.h:6,
                  from ./include/linux/mm.h:10,
                  from mm/slub.c:13:
 mm/slub.c: In function '___cmpxchg_double_slab.isra.0':
 ./include/linux/irqflags.h:177:3: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
   177 |   arch_local_irq_restore(flags);  \
       |   ^~~~~~~~~~~~~~~~~~~~~~
 mm/slub.c:408:17: note: 'flags' was declared here
   408 |   unsigned long flags;
       |                 ^~~~~
 In file included from ./include/linux/string.h:262,
                  from ./include/linux/bitmap.h:10,
                  from ./include/linux/cpumask.h:12,

No idea what's special about arm allmodconfig that confuses the
compiler.

-- 
Mel Gorman
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help