Re: [PATCH v7 RESENT] io_uring: releasing CPU resources when polling

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

 



Hi hexue,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.11-rc2 next-20240808]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/hexue/io_uring-releasing-CPU-resources-when-polling/20240808-153455
base:   linus/master
patch link:    https://lore.kernel.org/r/20240808071712.2429842-1-xue01.he%40samsung.com
patch subject: [PATCH v7 RESENT] io_uring: releasing CPU resources when polling
config: x86_64-randconfig-161-20240809 (https://download.01.org/0day-ci/archive/20240809/202408091329.zC0XSfdm-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)

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/202408091329.zC0XSfdm-lkp@xxxxxxxxx/

smatch warnings:
io_uring/rw.c:1183 io_uring_hybrid_poll() warn: unsigned 'runtime' is never less than zero.

vim +/runtime +1183 io_uring/rw.c

  1171	
  1172	static int io_uring_hybrid_poll(struct io_kiocb *req,
  1173					struct io_comp_batch *iob, unsigned int poll_flags)
  1174	{
  1175		struct io_ring_ctx *ctx = req->ctx;
  1176		int ret;
  1177		u64 runtime, sleep_time;
  1178	
  1179		sleep_time = io_delay(ctx, req);
  1180		ret = io_uring_classic_poll(req, iob, poll_flags);
  1181		req->iopoll_end = ktime_get_ns();
  1182		runtime = req->iopoll_end - req->iopoll_start - sleep_time;
> 1183		if (runtime < 0)
  1184			return 0;
  1185	
  1186		/* use minimize sleep time if there are different speed
  1187		 * drivers, it could get more completions from fast one
  1188		 */
  1189		if (ctx->available_time > runtime)
  1190			ctx->available_time = runtime;
  1191		return ret;
  1192	}
  1193	

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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux