[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202210220222.7nVtCxfj-lkp@intel.com>
Date: Sat, 22 Oct 2022 03:00:39 +0800
From: kernel test robot <lkp@...el.com>
To: Jiri Kosina <jikos@...nel.org>,
Christoph Lameter <cl@...ux-foundation.org>,
Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Hyeonggon Yoo <42.hyeyoo@...il.com>
Cc: kbuild-all@...ts.01.org,
Linux Memory Management List <linux-mm@...ck.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/slab: Annotate kmem_cache_node->list_lock as raw
Hi Jiri,
I love your patch! Yet something to improve:
[auto build test ERROR on akpm-mm/mm-everything]
url: https://github.com/intel-lab-lkp/linux/commits/Jiri-Kosina/mm-slab-Annotate-kmem_cache_node-list_lock-as-raw/20221021-225037
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/nycvar.YFH.7.76.2210211643330.29912%40cbobk.fhfr.pm
patch subject: [PATCH] mm/slab: Annotate kmem_cache_node->list_lock as raw
config: x86_64-rhel-8.3-func
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/709b8ca6934319e9e8e0519baa3ac2bb4f634451
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jiri-Kosina/mm-slab-Annotate-kmem_cache_node-list_lock-as-raw/20221021-225037
git checkout 709b8ca6934319e9e8e0519baa3ac2bb4f634451
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
243 | flags = _raw_spin_lock_irqsave(lock); \
| ^~~~
mm/slub.c:2946:9: note: in expansion of macro 'spin_lock_irqsave'
2946 | spin_lock_irqsave(&n->list_lock, flags);
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
include/linux/spinlock.h:323:67: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
323 | static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
| ~~~~~~~~~~~~^~~~
mm/slub.c:2949:32: error: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type [-Werror=incompatible-pointer-types]
2949 | spin_unlock_irqrestore(&n->list_lock, flags);
| ^~~~~~~~~~~~~
| |
| raw_spinlock_t * {aka struct raw_spinlock *}
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
include/linux/spinlock.h:403:64: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
403 | static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
| ~~~~~~~~~~~~^~~~
mm/slub.c: In function '__slab_free':
mm/slub.c:3483:48: error: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type [-Werror=incompatible-pointer-types]
3483 | spin_unlock_irqrestore(&n->list_lock, flags);
| ^~~~~~~~~~~~~
| |
| raw_spinlock_t * {aka struct raw_spinlock *}
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
include/linux/spinlock.h:403:64: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
403 | static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
| ~~~~~~~~~~~~^~~~
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
mm/slub.c:3515:51: error: passing argument 1 of 'spinlock_check' from incompatible pointer type [-Werror=incompatible-pointer-types]
3515 | spin_lock_irqsave(&n->list_lock, flags);
| ^~~~~~~~~~~~~
| |
| raw_spinlock_t * {aka struct raw_spinlock *}
include/linux/spinlock.h:243:48: note: in definition of macro 'raw_spin_lock_irqsave'
243 | flags = _raw_spin_lock_irqsave(lock); \
| ^~~~
mm/slub.c:3515:33: note: in expansion of macro 'spin_lock_irqsave'
3515 | spin_lock_irqsave(&n->list_lock, flags);
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
include/linux/spinlock.h:323:67: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
323 | static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
| ~~~~~~~~~~~~^~~~
mm/slub.c:3557:32: error: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type [-Werror=incompatible-pointer-types]
3557 | spin_unlock_irqrestore(&n->list_lock, flags);
| ^~~~~~~~~~~~~
| |
| raw_spinlock_t * {aka struct raw_spinlock *}
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
include/linux/spinlock.h:403:64: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
403 | static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
| ~~~~~~~~~~~~^~~~
mm/slub.c:3572:32: error: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type [-Werror=incompatible-pointer-types]
3572 | spin_unlock_irqrestore(&n->list_lock, flags);
| ^~~~~~~~~~~~~
| |
| raw_spinlock_t * {aka struct raw_spinlock *}
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
include/linux/spinlock.h:403:64: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
403 | static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
| ~~~~~~~~~~~~^~~~
mm/slub.c: In function 'init_kmem_cache_node':
mm/slub.c:4008:24: error: passing argument 1 of 'spinlock_check' from incompatible pointer type [-Werror=incompatible-pointer-types]
4008 | spin_lock_init(&n->list_lock);
| ^~~~~~~~~~~~~
| |
| raw_spinlock_t * {aka struct raw_spinlock *}
include/linux/spinlock.h:342:24: note: in definition of macro 'spin_lock_init'
342 | spinlock_check(_lock); \
| ^~~~~
include/linux/spinlock.h:323:67: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
323 | static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
| ~~~~~~~~~~~~^~~~
In file included from include/linux/spinlock.h:88,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
>> include/linux/spinlock_types.h:41:9: error: incompatible types when assigning to type 'raw_spinlock_t' {aka 'struct raw_spinlock'} from type 'spinlock_t' {aka 'struct spinlock'}
41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname)
| ^
include/linux/spinlock.h:343:20: note: in expansion of macro '__SPIN_LOCK_UNLOCKED'
343 | *(_lock) = __SPIN_LOCK_UNLOCKED(_lock); \
| ^~~~~~~~~~~~~~~~~~~~
mm/slub.c:4008:9: note: in expansion of macro 'spin_lock_init'
4008 | spin_lock_init(&n->list_lock);
| ^~~~~~~~~~~~~~
mm/slub.c: In function 'free_partial':
mm/slub.c:4393:23: error: passing argument 1 of 'spin_lock_irq' from incompatible pointer type [-Werror=incompatible-pointer-types]
4393 | spin_lock_irq(&n->list_lock);
| ^~~~~~~~~~~~~
| |
| raw_spinlock_t * {aka struct raw_spinlock *}
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
include/linux/spinlock.h:373:55: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
373 | static __always_inline void spin_lock_irq(spinlock_t *lock)
| ~~~~~~~~~~~~^~~~
mm/slub.c:4403:25: error: passing argument 1 of 'spin_unlock_irq' from incompatible pointer type [-Werror=incompatible-pointer-types]
4403 | spin_unlock_irq(&n->list_lock);
| ^~~~~~~~~~~~~
| |
| raw_spinlock_t * {aka struct raw_spinlock *}
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
include/linux/spinlock.h:398:57: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
398 | static __always_inline void spin_unlock_irq(spinlock_t *lock)
| ~~~~~~~~~~~~^~~~
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
mm/slub.c: In function '__kmem_cache_do_shrink':
mm/slub.c:4607:35: error: passing argument 1 of 'spinlock_check' from incompatible pointer type [-Werror=incompatible-pointer-types]
4607 | spin_lock_irqsave(&n->list_lock, flags);
| ^~~~~~~~~~~~~
| |
| raw_spinlock_t * {aka struct raw_spinlock *}
include/linux/spinlock.h:243:48: note: in definition of macro 'raw_spin_lock_irqsave'
243 | flags = _raw_spin_lock_irqsave(lock); \
| ^~~~
mm/slub.c:4607:17: note: in expansion of macro 'spin_lock_irqsave'
4607 | spin_lock_irqsave(&n->list_lock, flags);
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
include/linux/spinlock.h:323:67: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
323 | static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
| ~~~~~~~~~~~~^~~~
mm/slub.c:4639:40: error: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type [-Werror=incompatible-pointer-types]
4639 | spin_unlock_irqrestore(&n->list_lock, flags);
| ^~~~~~~~~~~~~
| |
| raw_spinlock_t * {aka struct raw_spinlock *}
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
include/linux/spinlock.h:403:64: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
403 | static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
| ~~~~~~~~~~~~^~~~
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
mm/slub.c: In function 'validate_slab_node':
mm/slub.c:4962:27: error: passing argument 1 of 'spinlock_check' from incompatible pointer type [-Werror=incompatible-pointer-types]
4962 | spin_lock_irqsave(&n->list_lock, flags);
| ^~~~~~~~~~~~~
| |
| raw_spinlock_t * {aka struct raw_spinlock *}
include/linux/spinlock.h:243:48: note: in definition of macro 'raw_spin_lock_irqsave'
243 | flags = _raw_spin_lock_irqsave(lock); \
| ^~~~
mm/slub.c:4962:9: note: in expansion of macro 'spin_lock_irqsave'
4962 | spin_lock_irqsave(&n->list_lock, flags);
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
include/linux/spinlock.h:323:67: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *' {aka 'struct raw_spinlock *'}
323 | static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
| ~~~~~~~~~~~~^~~~
mm/slub.c:4988:32: error: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type [-Werror=incompatible-pointer-types]
4988 | spin_unlock_irqrestore(&n->list_lock, flags);
| ^~~~~~~~~~~~~
| |
| raw_spinlock_t * {aka struct raw_spinlock *}
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from mm/slub.c:13:
vim +41 include/linux/spinlock_types.h
c2f21ce2e31286 Thomas Gleixner 2009-12-02 30
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 31 #define ___SPIN_LOCK_INITIALIZER(lockname) \
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 32 { \
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 33 .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 34 SPIN_DEBUG_INIT(lockname) \
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 35 SPIN_DEP_MAP_INIT(lockname) }
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 36
c2f21ce2e31286 Thomas Gleixner 2009-12-02 37 #define __SPIN_LOCK_INITIALIZER(lockname) \
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 38 { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } }
c2f21ce2e31286 Thomas Gleixner 2009-12-02 39
c2f21ce2e31286 Thomas Gleixner 2009-12-02 40 #define __SPIN_LOCK_UNLOCKED(lockname) \
c2f21ce2e31286 Thomas Gleixner 2009-12-02 @41 (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname)
fb1c8f93d869b3 Ingo Molnar 2005-09-10 42
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (170487 bytes)
Powered by blists - more mailing lists