mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Keith Busch <kbusch@kernel.org>,
	Chaitanya Kulkarni <kch@nvidia.com>,
	Christoph Hellwig <hch@lst.de>
Subject: drivers/nvme/host/tcp.c:1578: warning: Function parameter or struct member 'queue' not described in 'nvme_tcp_set_queue_io_cpu'
Date: Mon, 3 Feb 2025 23:11:49 +0800	[thread overview]
Message-ID: <202502032315.Rlhp9d3Y-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2014c95afecee3e76ca4a56956a936e23283f05b
commit: 32193789878c259e39b97bd0c0f2f0ccbe5cb8a8 nvme-tcp: Fix I/O queue cpu spreading for multiple controllers
date:   3 weeks ago
config: alpha-randconfig-p001-20211207 (https://download.01.org/0day-ci/archive/20250203/202502032315.Rlhp9d3Y-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250203/202502032315.Rlhp9d3Y-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/202502032315.Rlhp9d3Y-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/nvme/host/tcp.c:1578: warning: Function parameter or struct member 'queue' not described in 'nvme_tcp_set_queue_io_cpu'
>> drivers/nvme/host/tcp.c:1578: warning: expecting prototype for Track the number of queues assigned to each cpu using a global per(). Prototype was for nvme_tcp_set_queue_io_cpu() instead


vim +1578 drivers/nvme/host/tcp.c

40510a639ec08db Sagi Grimberg 2020-02-25  1567  
32193789878c259 Sagi Grimberg 2025-01-04  1568  /**
32193789878c259 Sagi Grimberg 2025-01-04  1569   * Track the number of queues assigned to each cpu using a global per-cpu
32193789878c259 Sagi Grimberg 2025-01-04  1570   * counter and select the least used cpu from the mq_map. Our goal is to spread
32193789878c259 Sagi Grimberg 2025-01-04  1571   * different controllers I/O threads across different cpu cores.
32193789878c259 Sagi Grimberg 2025-01-04  1572   *
32193789878c259 Sagi Grimberg 2025-01-04  1573   * Note that the accounting is not 100% perfect, but we don't need to be, we're
32193789878c259 Sagi Grimberg 2025-01-04  1574   * simply putting our best effort to select the best candidate cpu core that we
32193789878c259 Sagi Grimberg 2025-01-04  1575   * find at any given point.
32193789878c259 Sagi Grimberg 2025-01-04  1576   */
40510a639ec08db Sagi Grimberg 2020-02-25  1577  static void nvme_tcp_set_queue_io_cpu(struct nvme_tcp_queue *queue)
40510a639ec08db Sagi Grimberg 2020-02-25 @1578  {
40510a639ec08db Sagi Grimberg 2020-02-25  1579  	struct nvme_tcp_ctrl *ctrl = queue->ctrl;
32193789878c259 Sagi Grimberg 2025-01-04  1580  	struct blk_mq_tag_set *set = &ctrl->tag_set;
32193789878c259 Sagi Grimberg 2025-01-04  1581  	int qid = nvme_tcp_queue_id(queue) - 1;
32193789878c259 Sagi Grimberg 2025-01-04  1582  	unsigned int *mq_map = NULL;
32193789878c259 Sagi Grimberg 2025-01-04  1583  	int cpu, min_queues = INT_MAX, io_cpu;
32193789878c259 Sagi Grimberg 2025-01-04  1584  
32193789878c259 Sagi Grimberg 2025-01-04  1585  	if (wq_unbound)
32193789878c259 Sagi Grimberg 2025-01-04  1586  		goto out;
40510a639ec08db Sagi Grimberg 2020-02-25  1587  
40510a639ec08db Sagi Grimberg 2020-02-25  1588  	if (nvme_tcp_default_queue(queue))
32193789878c259 Sagi Grimberg 2025-01-04  1589  		mq_map = set->map[HCTX_TYPE_DEFAULT].mq_map;
40510a639ec08db Sagi Grimberg 2020-02-25  1590  	else if (nvme_tcp_read_queue(queue))
32193789878c259 Sagi Grimberg 2025-01-04  1591  		mq_map = set->map[HCTX_TYPE_READ].mq_map;
40510a639ec08db Sagi Grimberg 2020-02-25  1592  	else if (nvme_tcp_poll_queue(queue))
32193789878c259 Sagi Grimberg 2025-01-04  1593  		mq_map = set->map[HCTX_TYPE_POLL].mq_map;
32193789878c259 Sagi Grimberg 2025-01-04  1594  
32193789878c259 Sagi Grimberg 2025-01-04  1595  	if (WARN_ON(!mq_map))
32193789878c259 Sagi Grimberg 2025-01-04  1596  		goto out;
32193789878c259 Sagi Grimberg 2025-01-04  1597  
32193789878c259 Sagi Grimberg 2025-01-04  1598  	/* Search for the least used cpu from the mq_map */
32193789878c259 Sagi Grimberg 2025-01-04  1599  	io_cpu = WORK_CPU_UNBOUND;
32193789878c259 Sagi Grimberg 2025-01-04  1600  	for_each_online_cpu(cpu) {
32193789878c259 Sagi Grimberg 2025-01-04  1601  		int num_queues = atomic_read(&nvme_tcp_cpu_queues[cpu]);
32193789878c259 Sagi Grimberg 2025-01-04  1602  
32193789878c259 Sagi Grimberg 2025-01-04  1603  		if (mq_map[cpu] != qid)
32193789878c259 Sagi Grimberg 2025-01-04  1604  			continue;
32193789878c259 Sagi Grimberg 2025-01-04  1605  		if (num_queues < min_queues) {
32193789878c259 Sagi Grimberg 2025-01-04  1606  			io_cpu = cpu;
32193789878c259 Sagi Grimberg 2025-01-04  1607  			min_queues = num_queues;
32193789878c259 Sagi Grimberg 2025-01-04  1608  		}
32193789878c259 Sagi Grimberg 2025-01-04  1609  	}
32193789878c259 Sagi Grimberg 2025-01-04  1610  	if (io_cpu != WORK_CPU_UNBOUND) {
32193789878c259 Sagi Grimberg 2025-01-04  1611  		queue->io_cpu = io_cpu;
32193789878c259 Sagi Grimberg 2025-01-04  1612  		atomic_inc(&nvme_tcp_cpu_queues[io_cpu]);
32193789878c259 Sagi Grimberg 2025-01-04  1613  		set_bit(NVME_TCP_Q_IO_CPU_SET, &queue->flags);
32193789878c259 Sagi Grimberg 2025-01-04  1614  	}
32193789878c259 Sagi Grimberg 2025-01-04  1615  out:
32193789878c259 Sagi Grimberg 2025-01-04  1616  	dev_dbg(ctrl->ctrl.device, "queue %d: using cpu %d\n",
32193789878c259 Sagi Grimberg 2025-01-04  1617  		qid, queue->io_cpu);
40510a639ec08db Sagi Grimberg 2020-02-25  1618  }
40510a639ec08db Sagi Grimberg 2020-02-25  1619  

:::::: The code at line 1578 was first introduced by commit
:::::: 40510a639ec08db81d5ff9c79856baf9dda94748 nvme-tcp: optimize queue io_cpu assignment for multiple queue maps

:::::: TO: Sagi Grimberg <sagi@grimberg.me>
:::::: CC: Keith Busch <kbusch@kernel.org>

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

                 reply	other threads:[~2025-02-03 15:12 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=202502032315.Rlhp9d3Y-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=kch@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sagi@grimberg.me \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®