[vbabka:slub-percpu-caches-v1 2/5] mm/slub.c:3568:26: error: implicit declaration of function 'alloc_from_pca'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git slub-percpu-caches-v1
head:   23793c9cd4b2fc31144dba68dd67554b8e4308e9
commit: 88f3fc9382220fb76fbd700a74cce623dadf8138 [2/5] mm, slub: add opt-in slub_percpu_array
config: loongarch-randconfig-r021-20230808 (https://download.01.org/0day-ci/archive/20230808/202308082248.9OaLeTUo-lkp@xxxxxxxxx/config)
compiler: loongarch64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230808/202308082248.9OaLeTUo-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308082248.9OaLeTUo-lkp@xxxxxxxxx/

All error/warnings (new ones prefixed by >>):

   mm/slub.c: In function 'slab_alloc_node':
>> mm/slub.c:3568:26: error: implicit declaration of function 'alloc_from_pca' [-Werror=implicit-function-declaration]
    3568 |                 object = alloc_from_pca(s);
         |                          ^~~~~~~~~~~~~~
>> mm/slub.c:3568:24: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    3568 |                 object = alloc_from_pca(s);
         |                        ^
   cc1: some warnings being treated as errors


vim +/alloc_from_pca +3568 mm/slub.c

  3541	
  3542	/*
  3543	 * Inlined fastpath so that allocation functions (kmalloc, kmem_cache_alloc)
  3544	 * have the fastpath folded into their functions. So no function call
  3545	 * overhead for requests that can be satisfied on the fastpath.
  3546	 *
  3547	 * The fastpath works by first checking if the lockless freelist can be used.
  3548	 * If not then __slab_alloc is called for slow processing.
  3549	 *
  3550	 * Otherwise we can simply pick the next object from the lockless free list.
  3551	 */
  3552	static __fastpath_inline void *slab_alloc_node(struct kmem_cache *s, struct list_lru *lru,
  3553			gfp_t gfpflags, int node, unsigned long addr, size_t orig_size)
  3554	{
  3555		void *object;
  3556		struct obj_cgroup *objcg = NULL;
  3557		bool init = false;
  3558	
  3559		s = slab_pre_alloc_hook(s, lru, &objcg, 1, gfpflags);
  3560		if (!s)
  3561			return NULL;
  3562	
  3563		object = kfence_alloc(s, orig_size, gfpflags);
  3564		if (unlikely(object))
  3565			goto out;
  3566	
  3567		if (s->cpu_array)
> 3568			object = alloc_from_pca(s);
  3569	
  3570		if (!object)
  3571			object = __slab_alloc_node(s, gfpflags, node, addr, orig_size);
  3572	
  3573		maybe_wipe_obj_freeptr(s, object);
  3574		init = slab_want_init_on_alloc(gfpflags, s);
  3575	
  3576	out:
  3577		/*
  3578		 * When init equals 'true', like for kzalloc() family, only
  3579		 * @orig_size bytes might be zeroed instead of s->object_size
  3580		 */
  3581		slab_post_alloc_hook(s, objcg, gfpflags, 1, &object, init, orig_size);
  3582	
  3583		return object;
  3584	}
  3585	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux