All of lore.kernel.org
 help / color / mirror / Atom feed
* [vbabka:slub-percpu-caches-v4r1-BROKEN 2/6] mm/slub.c:4905:13: warning: 'flush_pca' defined but not used
@ 2024-02-03 13:58 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-02-03 13:58 UTC (permalink / raw)
  To: Vlastimil Babka; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git slub-percpu-caches-v4r1-BROKEN
head:   769a361e3d36bf4b006b69c6adbdcd24fe2e470a
commit: 8f3b3550b6d09f88b11b9d89eb1d6a215c48bf98 [2/6] mm/slub: add opt-in percpu array cache of objects
config: openrisc-defconfig (https://download.01.org/0day-ci/archive/20240203/202402032111.AEPLIyDN-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240203/202402032111.AEPLIyDN-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402032111.AEPLIyDN-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> mm/slub.c:4905:13: warning: 'flush_pca' defined but not used [-Wunused-function]
    4905 | static void flush_pca(struct kmem_cache *s, unsigned int count)
         |             ^~~~~~~~~


vim +/flush_pca +4905 mm/slub.c

  4904	
> 4905	static void flush_pca(struct kmem_cache *s, unsigned int count)
  4906	{
  4907		struct slub_percpu_array *pca;
  4908		unsigned int batch, remaining;
  4909		void *objects[PCA_BATCH_MAX];
  4910		unsigned long flags;
  4911	
  4912		local_lock_irqsave(&s->cpu_array->lock, flags);
  4913		pca = this_cpu_read(s->cpu_array);
  4914	
  4915	next_batch:
  4916		batch = min(count, PCA_BATCH_MAX);
  4917	
  4918		batch = min(batch, pca->used);
  4919	
  4920		for (unsigned int i = 0; i < batch; i++) {
  4921			objects[i] = pca->objects[--pca->used];
  4922		}
  4923	
  4924		remaining = pca->used;
  4925	
  4926		local_unlock_irqrestore(&s->cpu_array->lock, flags);
  4927	
  4928		__kmem_cache_free_bulk(s, batch, &objects[0]);
  4929	
  4930		stat_add(s, PCA_FLUSH, batch);
  4931	
  4932		if (batch < count && remaining > 0) {
  4933			count -= batch;
  4934			local_lock_irqsave(&s->cpu_array->lock, flags);
  4935			pca = this_cpu_read(s->cpu_array);
  4936			goto next_batch;
  4937		}
  4938	}
  4939	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-03 13:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-03 13:58 [vbabka:slub-percpu-caches-v4r1-BROKEN 2/6] mm/slub.c:4905:13: warning: 'flush_pca' defined but not used kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.