Re: [PATCH] mm, slab: Use kmem_cache_zalloc() instead of kmem_cache_alloc() with flag GFP_ZERO.

From: kernel test robot
Date: Wed Jun 17 2020 - 07:19:40 EST


Hi Yi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mmotm/master]

url: https://github.com/0day-ci/linux/commits/Yi-Wang/mm-slab-Use-kmem_cache_zalloc-instead-of-kmem_cache_alloc-with-flag-GFP_ZERO/20200617-151513
base: git://git.cmpxchg.org/linux-mmotm.git master
config: nds32-defconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/irq.h:21,
from include/asm-generic/hardirq.h:13,
from ./arch/nds32/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:9,
from include/linux/highmem.h:10,
from include/linux/pagemap.h:11,
from fs//crypto/crypto.c:23:
include/linux/slab.h: In function 'kmem_cache_zalloc':
>> include/linux/slab.h:678:21: error: inlining failed in call to always_inline 'kmem_cache_zalloc': recursive inlining
678 | static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
| ^~~~~~~~~~~~~~~~~
include/linux/slab.h:680:9: note: called from here
680 | return kmem_cache_zalloc(k, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/slab.h: In function 'fscrypt_get_ctx':
>> include/linux/slab.h:678:21: error: inlining failed in call to always_inline 'kmem_cache_zalloc': recursive inlining
678 | static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
| ^~~~~~~~~~~~~~~~~
include/linux/slab.h:680:9: note: called from here
680 | return kmem_cache_zalloc(k, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/slab.h: In function 'fscrypt_initialize':
>> include/linux/slab.h:678:21: error: inlining failed in call to always_inline 'kmem_cache_zalloc': recursive inlining
678 | static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
| ^~~~~~~~~~~~~~~~~
include/linux/slab.h:680:9: note: called from here
680 | return kmem_cache_zalloc(k, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/irq.h:21,
from include/asm-generic/hardirq.h:13,
from ./arch/nds32/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:9,
from include/linux/highmem.h:10,
from include/linux/pagemap.h:11,
from fs//ext4/page-io.c:13:
include/linux/slab.h: In function 'kmem_cache_zalloc':
>> include/linux/slab.h:678:21: error: inlining failed in call to always_inline 'kmem_cache_zalloc': recursive inlining
678 | static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
| ^~~~~~~~~~~~~~~~~
include/linux/slab.h:680:9: note: called from here
680 | return kmem_cache_zalloc(k, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/slab.h: In function 'ext4_init_io_end':
>> include/linux/slab.h:678:21: error: inlining failed in call to always_inline 'kmem_cache_zalloc': recursive inlining
678 | static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
| ^~~~~~~~~~~~~~~~~
include/linux/slab.h:680:9: note: called from here
680 | return kmem_cache_zalloc(k, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/genhd.h:16,
from include/linux/blkdev.h:11,
from include/linux/backing-dev.h:15,
from fs//fuse/fuse_i.h:23,
from fs//fuse/dev.c:9:
include/linux/slab.h: In function 'kmem_cache_zalloc':
>> include/linux/slab.h:678:21: error: inlining failed in call to always_inline 'kmem_cache_zalloc': recursive inlining
678 | static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
| ^~~~~~~~~~~~~~~~~
include/linux/slab.h:680:9: note: called from here
680 | return kmem_cache_zalloc(k, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/slab.h: In function '__fuse_request_alloc':
>> include/linux/slab.h:678:21: error: inlining failed in call to always_inline 'kmem_cache_zalloc': recursive inlining
678 | static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
| ^~~~~~~~~~~~~~~~~
include/linux/slab.h:680:9: note: called from here
680 | return kmem_cache_zalloc(k, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/irq.h:21,
from include/asm-generic/hardirq.h:13,
from ./arch/nds32/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:9,
from include/linux/highmem.h:10,
from include/linux/pagemap.h:11,
from include/linux/buffer_head.h:14,
from include/linux/jbd2.h:23,
from fs//jbd2/transaction.c:19:
include/linux/slab.h: In function 'kmem_cache_zalloc':
>> include/linux/slab.h:678:21: error: inlining failed in call to always_inline 'kmem_cache_zalloc': recursive inlining
678 | static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
| ^~~~~~~~~~~~~~~~~
include/linux/slab.h:680:9: note: called from here
680 | return kmem_cache_zalloc(k, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/slab.h: In function 'start_this_handle':
>> include/linux/slab.h:678:21: error: inlining failed in call to always_inline 'kmem_cache_zalloc': recursive inlining
678 | static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
| ^~~~~~~~~~~~~~~~~
include/linux/slab.h:680:9: note: called from here
680 | return kmem_cache_zalloc(k, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/slab.h: In function 'jbd2__journal_start':
>> include/linux/slab.h:678:21: error: inlining failed in call to always_inline 'kmem_cache_zalloc': recursive inlining
678 | static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
| ^~~~~~~~~~~~~~~~~
include/linux/slab.h:680:9: note: called from here
680 | return kmem_cache_zalloc(k, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/irq.h:21,
from include/asm-generic/hardirq.h:13,
from ./arch/nds32/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:9,
from include/linux/highmem.h:10,
from include/linux/pagemap.h:11,
from include/linux/buffer_head.h:14,
from include/linux/jbd2.h:23,
from fs//jbd2/journal.c:25:
include/linux/slab.h: In function 'kmem_cache_zalloc':
>> include/linux/slab.h:678:21: error: inlining failed in call to always_inline 'kmem_cache_zalloc': recursive inlining
678 | static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
| ^~~~~~~~~~~~~~~~~
include/linux/slab.h:680:9: note: called from here
680 | return kmem_cache_zalloc(k, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/slab.h: In function 'jbd2_journal_add_journal_head':
>> include/linux/slab.h:678:21: error: inlining failed in call to always_inline 'kmem_cache_zalloc': recursive inlining
678 | static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
| ^~~~~~~~~~~~~~~~~
include/linux/slab.h:680:9: note: called from here
680 | return kmem_cache_zalloc(k, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/slab.h:678:21: error: inlining failed in call to always_inline 'kmem_cache_zalloc': recursive inlining
678 | static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
| ^~~~~~~~~~~~~~~~~
include/linux/slab.h:680:9: note: called from here
680 | return kmem_cache_zalloc(k, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/kmem_cache_zalloc +678 include/linux/slab.h

10cef602950291 Matt Mackall 2006-01-08 674
81cda6626178cd Christoph Lameter 2007-07-17 675 /*
81cda6626178cd Christoph Lameter 2007-07-17 676 * Shortcuts
81cda6626178cd Christoph Lameter 2007-07-17 677 */
81cda6626178cd Christoph Lameter 2007-07-17 @678 static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
81cda6626178cd Christoph Lameter 2007-07-17 679 {
3b0c169b666d29 Liao Pingfang 2020-06-17 680 return kmem_cache_zalloc(k, flags);
81cda6626178cd Christoph Lameter 2007-07-17 681 }
81cda6626178cd Christoph Lameter 2007-07-17 682

:::::: The code at line 678 was first introduced by commit
:::::: 81cda6626178cd55297831296ba8ecedbfd8b52d Slab allocators: Cleanup zeroing allocations

:::::: TO: Christoph Lameter <clameter@xxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip