[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202306090341.ShxjwRn1-lkp@intel.com>
Date: Fri, 9 Jun 2023 03:33:04 +0800
From: kernel test robot <lkp@...el.com>
To: Stefan Roesch <shr@...kernel.io>, io-uring@...r.kernel.org,
kernel-team@...com
Cc: oe-kbuild-all@...ts.linux.dev, shr@...kernel.io, axboe@...nel.dk,
ammarfaizi2@...weeb.org, netdev@...r.kernel.org, kuba@...nel.org,
olivier@...llion01.com
Subject: Re: [PATCH v15 1/7] net: split off __napi_busy_poll from
napi_busy_poll
Hi Stefan,
kernel test robot noticed the following build warnings:
[auto build test WARNING on f026be0e1e881e3395c3d5418ffc8c2a2203c3f3]
url: https://github.com/intel-lab-lkp/linux/commits/Stefan-Roesch/net-split-off-__napi_busy_poll-from-napi_busy_poll/20230609-010104
base: f026be0e1e881e3395c3d5418ffc8c2a2203c3f3
patch link: https://lore.kernel.org/r/20230608163839.2891748-2-shr%40devkernel.io
patch subject: [PATCH v15 1/7] net: split off __napi_busy_poll from napi_busy_poll
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20230609/202306090341.ShxjwRn1-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 12.3.0
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout f026be0e1e881e3395c3d5418ffc8c2a2203c3f3
b4 shazam https://lore.kernel.org/r/20230608163839.2891748-2-shr@devkernel.io
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=alpha olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash net/core/
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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306090341.ShxjwRn1-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> net/core/dev.c:6182:6: warning: no previous prototype for '__napi_busy_loop' [-Wmissing-prototypes]
6182 | void __napi_busy_loop(unsigned int napi_id,
| ^~~~~~~~~~~~~~~~
vim +/__napi_busy_loop +6182 net/core/dev.c
6181
> 6182 void __napi_busy_loop(unsigned int napi_id,
6183 bool (*loop_end)(void *, unsigned long),
6184 void *loop_end_arg, bool prefer_busy_poll, u16 budget,
6185 bool rcu)
6186 {
6187 unsigned long start_time = loop_end ? busy_loop_current_time() : 0;
6188 int (*napi_poll)(struct napi_struct *napi, int budget);
6189 void *have_poll_lock = NULL;
6190 struct napi_struct *napi;
6191
6192 restart:
6193 napi_poll = NULL;
6194
6195 if (!rcu)
6196 rcu_read_lock();
6197
6198 napi = napi_by_id(napi_id);
6199 if (!napi)
6200 goto out;
6201
6202 preempt_disable();
6203 for (;;) {
6204 int work = 0;
6205
6206 local_bh_disable();
6207 if (!napi_poll) {
6208 unsigned long val = READ_ONCE(napi->state);
6209
6210 /* If multiple threads are competing for this napi,
6211 * we avoid dirtying napi->state as much as we can.
6212 */
6213 if (val & (NAPIF_STATE_DISABLE | NAPIF_STATE_SCHED |
6214 NAPIF_STATE_IN_BUSY_POLL)) {
6215 if (prefer_busy_poll)
6216 set_bit(NAPI_STATE_PREFER_BUSY_POLL, &napi->state);
6217 goto count;
6218 }
6219 if (cmpxchg(&napi->state, val,
6220 val | NAPIF_STATE_IN_BUSY_POLL |
6221 NAPIF_STATE_SCHED) != val) {
6222 if (prefer_busy_poll)
6223 set_bit(NAPI_STATE_PREFER_BUSY_POLL, &napi->state);
6224 goto count;
6225 }
6226 have_poll_lock = netpoll_poll_lock(napi);
6227 napi_poll = napi->poll;
6228 }
6229 work = napi_poll(napi, budget);
6230 trace_napi_poll(napi, work, budget);
6231 gro_normal_list(napi);
6232 count:
6233 if (work > 0)
6234 __NET_ADD_STATS(dev_net(napi->dev),
6235 LINUX_MIB_BUSYPOLLRXPACKETS, work);
6236 local_bh_enable();
6237
6238 if (!loop_end || loop_end(loop_end_arg, start_time))
6239 break;
6240
6241 if (unlikely(need_resched())) {
6242 if (rcu)
6243 break;
6244 if (napi_poll)
6245 busy_poll_stop(napi, have_poll_lock, prefer_busy_poll, budget);
6246 preempt_enable();
6247 rcu_read_unlock();
6248 cond_resched();
6249 if (loop_end(loop_end_arg, start_time))
6250 return;
6251 goto restart;
6252 }
6253 cpu_relax();
6254 }
6255 if (napi_poll)
6256 busy_poll_stop(napi, have_poll_lock, prefer_busy_poll, budget);
6257 preempt_enable();
6258 out:
6259 if (!rcu)
6260 rcu_read_unlock();
6261 }
6262
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists