All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [vbabka:slub-percpu-caches-v4r1-BROKEN 2/6] mm/slub.c:4905:13: warning: 'flush_pca' defined but not used
Date: Sat, 3 Feb 2024 21:58:44 +0800	[thread overview]
Message-ID: <202402032111.AEPLIyDN-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-02-03 13:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202402032111.AEPLIyDN-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.