All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH V2 03/17] io_uring: add IORING_OP_FUSED_CMD
@ 2023-03-11 18:18 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2023-03-11 18:18 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence static check warning: include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20230307141520.793891-4-ming.lei@redhat.com>
References: <20230307141520.793891-4-ming.lei@redhat.com>
TO: Ming Lei <ming.lei@redhat.com>
TO: Jens Axboe <axboe@kernel.dk>
TO: io-uring@vger.kernel.org
CC: linux-block@vger.kernel.org
CC: Miklos Szeredi <mszeredi@redhat.com>
CC: ZiyangZhang <ZiyangZhang@linux.alibaba.com>
CC: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
CC: Bernd Schubert <bschubert@ddn.com>
CC: Ming Lei <ming.lei@redhat.com>

Hi Ming,

I love your patch! Perhaps something to improve:

[auto build test WARNING on axboe-block/for-next]
[also build test WARNING on char-misc/char-misc-testing char-misc/char-misc-next char-misc/char-misc-linus linus/master v6.3-rc1 next-20230310]
[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/Ming-Lei/io_uring-add-IO_URING_F_FUSED-and-prepare-for-supporting-OP_FUSED_CMD/20230307-222928
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
patch link:    https://lore.kernel.org/r/20230307141520.793891-4-ming.lei%40redhat.com
patch subject: [PATCH V2 03/17] io_uring: add IORING_OP_FUSED_CMD
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: microblaze-randconfig-s033-20230308 (https://download.01.org/0day-ci/archive/20230312/202303120203.sqqL7XCB-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/intel-lab-lkp/linux/commit/5e0eebd84413d4545e5fc0cc0ede6052cc8df81b
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Ming-Lei/io_uring-add-IO_URING_F_FUSED-and-prepare-for-supporting-OP_FUSED_CMD/20230307-222928
        git checkout 5e0eebd84413d4545e5fc0cc0ede6052cc8df81b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=microblaze olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=microblaze SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/r/202303120203.sqqL7XCB-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   kernel/sched/core.c: note: in included file (through kernel/sched/../../io_uring/io-wq.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
   kernel/sched/core.c:7040:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/core.c:7040:17: sparse:    struct task_struct *
   kernel/sched/core.c:7040:17: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/core.c:7256:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/core.c:7256:22: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/core.c:7256:22: sparse:    struct task_struct *
   kernel/sched/core.c: note: in included file:
   kernel/sched/sched.h:2073:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2073:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2231:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2231:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2073:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2231:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2073:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2231:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2073:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2231:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2073:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct *
--
   io_uring/epoll.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/epoll.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/uring_cmd.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/uring_cmd.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/statx.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/statx.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/net.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/net.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/msg_ring.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/msg_ring.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/timeout.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/timeout.c: note: in included file (through include/trace/events/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/sqpoll.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/sqpoll.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/fdinfo.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/fdinfo.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/openclose.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/openclose.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/tctx.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/tctx.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/cancel.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/cancel.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/poll.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/poll.c: note: in included file (through include/trace/events/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/kbuf.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/kbuf.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/rsrc.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/rsrc.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/opdef.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/opdef.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/rw.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/rw.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/io_uring.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/io_uring.c: note: in included file (through include/trace/events/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/nop.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/nop.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/xattr.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/xattr.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/fs.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/fs.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/splice.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/splice.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/notif.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/notif.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/sync.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/sync.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/advise.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/advise.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/filetable.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/filetable.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/fused_cmd.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/fused_cmd.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/io-wq.c: note: in included file:
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/io-wq.c: note: in included file (through io_uring/io-wq.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression

vim +475 include/linux/io_uring_types.h

e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  409  
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  410  enum {
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  411  	/* ctx owns file */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  412  	REQ_F_FIXED_FILE	= BIT(REQ_F_FIXED_FILE_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  413  	/* drain existing IO first */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  414  	REQ_F_IO_DRAIN		= BIT(REQ_F_IO_DRAIN_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  415  	/* linked sqes */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  416  	REQ_F_LINK		= BIT(REQ_F_LINK_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  417  	/* doesn't sever on completion < 0 */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  418  	REQ_F_HARDLINK		= BIT(REQ_F_HARDLINK_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  419  	/* IOSQE_ASYNC */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  420  	REQ_F_FORCE_ASYNC	= BIT(REQ_F_FORCE_ASYNC_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  421  	/* IOSQE_BUFFER_SELECT */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  422  	REQ_F_BUFFER_SELECT	= BIT(REQ_F_BUFFER_SELECT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  423  	/* IOSQE_CQE_SKIP_SUCCESS */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  424  	REQ_F_CQE_SKIP		= BIT(REQ_F_CQE_SKIP_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  425  
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  426  	/* fail rest of links */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  427  	REQ_F_FAIL		= BIT(REQ_F_FAIL_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  428  	/* on inflight list, should be cancelled and waited on exit reliably */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  429  	REQ_F_INFLIGHT		= BIT(REQ_F_INFLIGHT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  430  	/* read/write uses file position */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  431  	REQ_F_CUR_POS		= BIT(REQ_F_CUR_POS_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  432  	/* must not punt to workers */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  433  	REQ_F_NOWAIT		= BIT(REQ_F_NOWAIT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  434  	/* has or had linked timeout */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  435  	REQ_F_LINK_TIMEOUT	= BIT(REQ_F_LINK_TIMEOUT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  436  	/* needs cleanup */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  437  	REQ_F_NEED_CLEANUP	= BIT(REQ_F_NEED_CLEANUP_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  438  	/* already went through poll handler */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  439  	REQ_F_POLLED		= BIT(REQ_F_POLLED_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  440  	/* buffer already selected */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  441  	REQ_F_BUFFER_SELECTED	= BIT(REQ_F_BUFFER_SELECTED_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  442  	/* buffer selected from ring, needs commit */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  443  	REQ_F_BUFFER_RING	= BIT(REQ_F_BUFFER_RING_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  444  	/* caller should reissue async */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  445  	REQ_F_REISSUE		= BIT(REQ_F_REISSUE_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  446  	/* supports async reads/writes */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  447  	REQ_F_SUPPORT_NOWAIT	= BIT(REQ_F_SUPPORT_NOWAIT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  448  	/* regular file */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  449  	REQ_F_ISREG		= BIT(REQ_F_ISREG_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  450  	/* has creds assigned */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  451  	REQ_F_CREDS		= BIT(REQ_F_CREDS_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  452  	/* skip refcounting if not set */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  453  	REQ_F_REFCOUNT		= BIT(REQ_F_REFCOUNT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  454  	/* there is a linked timeout that has to be armed */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  455  	REQ_F_ARM_LTIMEOUT	= BIT(REQ_F_ARM_LTIMEOUT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  456  	/* ->async_data allocated */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  457  	REQ_F_ASYNC_DATA	= BIT(REQ_F_ASYNC_DATA_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  458  	/* don't post CQEs while failing linked requests */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  459  	REQ_F_SKIP_LINK_CQES	= BIT(REQ_F_SKIP_LINK_CQES_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  460  	/* single poll may be active */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  461  	REQ_F_SINGLE_POLL	= BIT(REQ_F_SINGLE_POLL_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  462  	/* double poll may active */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  463  	REQ_F_DOUBLE_POLL	= BIT(REQ_F_DOUBLE_POLL_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  464  	/* request has already done partial IO */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  465  	REQ_F_PARTIAL_IO	= BIT(REQ_F_PARTIAL_IO_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  466  	/* fast poll multishot mode */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  467  	REQ_F_APOLL_MULTISHOT	= BIT(REQ_F_APOLL_MULTISHOT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  468  	/* ->extra1 and ->extra2 are initialised */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  469  	REQ_F_CQE32_INIT	= BIT(REQ_F_CQE32_INIT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  470  	/* recvmsg special flag, clear EPOLLIN */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  471  	REQ_F_CLEAR_POLLIN	= BIT(REQ_F_CLEAR_POLLIN_BIT),
9ca9fb24d5febcc io_uring/io_uring_types.h      Pavel Begunkov 2022-06-16  472  	/* hashed into ->cancel_hash_locked, protected by ->uring_lock */
9ca9fb24d5febcc io_uring/io_uring_types.h      Pavel Begunkov 2022-06-16  473  	REQ_F_HASH_LOCKED	= BIT(REQ_F_HASH_LOCKED_BIT),
5e0eebd84413d45 include/linux/io_uring_types.h Ming Lei       2023-03-07  474  	/* slave request in fused cmd, won't be one uring cmd */
5e0eebd84413d45 include/linux/io_uring_types.h Ming Lei       2023-03-07 @475  	REQ_F_FUSED_SLAVE	= BIT(REQ_F_FUSED_SLAVE_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  476  };
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  477  

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

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: [PATCH V2 03/17] io_uring: add IORING_OP_FUSED_CMD
@ 2023-03-14  5:07 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2023-03-14  5:07 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence static check warning: include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20230307141520.793891-4-ming.lei@redhat.com>
References: <20230307141520.793891-4-ming.lei@redhat.com>
TO: Ming Lei <ming.lei@redhat.com>
TO: Jens Axboe <axboe@kernel.dk>
TO: io-uring@vger.kernel.org
CC: linux-block@vger.kernel.org
CC: Miklos Szeredi <mszeredi@redhat.com>
CC: ZiyangZhang <ZiyangZhang@linux.alibaba.com>
CC: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
CC: Bernd Schubert <bschubert@ddn.com>
CC: Ming Lei <ming.lei@redhat.com>

Hi Ming,

I love your patch! Perhaps something to improve:

[auto build test WARNING on axboe-block/for-next]
[also build test WARNING on char-misc/char-misc-testing char-misc/char-misc-next char-misc/char-misc-linus linus/master v6.3-rc2 next-20230310]
[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/Ming-Lei/io_uring-add-IO_URING_F_FUSED-and-prepare-for-supporting-OP_FUSED_CMD/20230307-222928
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
patch link:    https://lore.kernel.org/r/20230307141520.793891-4-ming.lei%40redhat.com
patch subject: [PATCH V2 03/17] io_uring: add IORING_OP_FUSED_CMD
:::::: branch date: 7 days ago
:::::: commit date: 7 days ago
config: microblaze-randconfig-s033-20230308 (https://download.01.org/0day-ci/archive/20230314/202303141202.PITF2ZKp-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/intel-lab-lkp/linux/commit/5e0eebd84413d4545e5fc0cc0ede6052cc8df81b
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Ming-Lei/io_uring-add-IO_URING_F_FUSED-and-prepare-for-supporting-OP_FUSED_CMD/20230307-222928
        git checkout 5e0eebd84413d4545e5fc0cc0ede6052cc8df81b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=microblaze olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=microblaze SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/r/202303141202.PITF2ZKp-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   kernel/sched/core.c: note: in included file (through kernel/sched/../../io_uring/io-wq.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
   kernel/sched/core.c:7040:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/core.c:7040:17: sparse:    struct task_struct *
   kernel/sched/core.c:7040:17: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/core.c:7256:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/core.c:7256:22: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/core.c:7256:22: sparse:    struct task_struct *
   kernel/sched/core.c: note: in included file:
   kernel/sched/sched.h:2073:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2073:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2231:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2231:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2073:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2231:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2073:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2231:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2073:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2231:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2231:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2073:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2073:25: sparse:    struct task_struct *
--
   io_uring/rw.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/rw.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/rsrc.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/rsrc.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/opdef.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/opdef.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/notif.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/notif.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/fused_cmd.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/fused_cmd.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/sync.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/sync.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/io-wq.c: note: in included file:
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/io-wq.c: note: in included file (through io_uring/io-wq.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/advise.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/advise.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/filetable.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/filetable.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/openclose.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/openclose.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/uring_cmd.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/uring_cmd.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/epoll.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/epoll.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/statx.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/statx.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/net.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/net.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/timeout.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/timeout.c: note: in included file (through include/trace/events/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/msg_ring.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/msg_ring.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/sqpoll.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/sqpoll.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/tctx.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/tctx.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/fdinfo.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/fdinfo.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/cancel.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/cancel.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/xattr.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/xattr.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/nop.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/nop.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/fs.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/fs.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/poll.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/poll.c: note: in included file (through include/trace/events/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/splice.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/splice.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/io_uring.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/io_uring.c: note: in included file (through include/trace/events/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression
--
   io_uring/kbuf.c: note: in included file (through io_uring/io_uring.h):
   io_uring/slist.h:116:29: sparse: sparse: no newline at end of file
   io_uring/kbuf.c: note: in included file (through io_uring/io_uring.h):
>> include/linux/io_uring_types.h:475:35: sparse: sparse: bad constant expression

vim +475 include/linux/io_uring_types.h

e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  409  
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  410  enum {
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  411  	/* ctx owns file */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  412  	REQ_F_FIXED_FILE	= BIT(REQ_F_FIXED_FILE_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  413  	/* drain existing IO first */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  414  	REQ_F_IO_DRAIN		= BIT(REQ_F_IO_DRAIN_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  415  	/* linked sqes */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  416  	REQ_F_LINK		= BIT(REQ_F_LINK_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  417  	/* doesn't sever on completion < 0 */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  418  	REQ_F_HARDLINK		= BIT(REQ_F_HARDLINK_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  419  	/* IOSQE_ASYNC */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  420  	REQ_F_FORCE_ASYNC	= BIT(REQ_F_FORCE_ASYNC_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  421  	/* IOSQE_BUFFER_SELECT */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  422  	REQ_F_BUFFER_SELECT	= BIT(REQ_F_BUFFER_SELECT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  423  	/* IOSQE_CQE_SKIP_SUCCESS */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  424  	REQ_F_CQE_SKIP		= BIT(REQ_F_CQE_SKIP_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  425  
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  426  	/* fail rest of links */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  427  	REQ_F_FAIL		= BIT(REQ_F_FAIL_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  428  	/* on inflight list, should be cancelled and waited on exit reliably */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  429  	REQ_F_INFLIGHT		= BIT(REQ_F_INFLIGHT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  430  	/* read/write uses file position */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  431  	REQ_F_CUR_POS		= BIT(REQ_F_CUR_POS_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  432  	/* must not punt to workers */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  433  	REQ_F_NOWAIT		= BIT(REQ_F_NOWAIT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  434  	/* has or had linked timeout */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  435  	REQ_F_LINK_TIMEOUT	= BIT(REQ_F_LINK_TIMEOUT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  436  	/* needs cleanup */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  437  	REQ_F_NEED_CLEANUP	= BIT(REQ_F_NEED_CLEANUP_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  438  	/* already went through poll handler */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  439  	REQ_F_POLLED		= BIT(REQ_F_POLLED_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  440  	/* buffer already selected */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  441  	REQ_F_BUFFER_SELECTED	= BIT(REQ_F_BUFFER_SELECTED_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  442  	/* buffer selected from ring, needs commit */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  443  	REQ_F_BUFFER_RING	= BIT(REQ_F_BUFFER_RING_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  444  	/* caller should reissue async */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  445  	REQ_F_REISSUE		= BIT(REQ_F_REISSUE_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  446  	/* supports async reads/writes */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  447  	REQ_F_SUPPORT_NOWAIT	= BIT(REQ_F_SUPPORT_NOWAIT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  448  	/* regular file */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  449  	REQ_F_ISREG		= BIT(REQ_F_ISREG_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  450  	/* has creds assigned */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  451  	REQ_F_CREDS		= BIT(REQ_F_CREDS_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  452  	/* skip refcounting if not set */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  453  	REQ_F_REFCOUNT		= BIT(REQ_F_REFCOUNT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  454  	/* there is a linked timeout that has to be armed */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  455  	REQ_F_ARM_LTIMEOUT	= BIT(REQ_F_ARM_LTIMEOUT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  456  	/* ->async_data allocated */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  457  	REQ_F_ASYNC_DATA	= BIT(REQ_F_ASYNC_DATA_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  458  	/* don't post CQEs while failing linked requests */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  459  	REQ_F_SKIP_LINK_CQES	= BIT(REQ_F_SKIP_LINK_CQES_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  460  	/* single poll may be active */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  461  	REQ_F_SINGLE_POLL	= BIT(REQ_F_SINGLE_POLL_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  462  	/* double poll may active */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  463  	REQ_F_DOUBLE_POLL	= BIT(REQ_F_DOUBLE_POLL_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  464  	/* request has already done partial IO */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  465  	REQ_F_PARTIAL_IO	= BIT(REQ_F_PARTIAL_IO_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  466  	/* fast poll multishot mode */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  467  	REQ_F_APOLL_MULTISHOT	= BIT(REQ_F_APOLL_MULTISHOT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  468  	/* ->extra1 and ->extra2 are initialised */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  469  	REQ_F_CQE32_INIT	= BIT(REQ_F_CQE32_INIT_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  470  	/* recvmsg special flag, clear EPOLLIN */
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  471  	REQ_F_CLEAR_POLLIN	= BIT(REQ_F_CLEAR_POLLIN_BIT),
9ca9fb24d5febcc io_uring/io_uring_types.h      Pavel Begunkov 2022-06-16  472  	/* hashed into ->cancel_hash_locked, protected by ->uring_lock */
9ca9fb24d5febcc io_uring/io_uring_types.h      Pavel Begunkov 2022-06-16  473  	REQ_F_HASH_LOCKED	= BIT(REQ_F_HASH_LOCKED_BIT),
5e0eebd84413d45 include/linux/io_uring_types.h Ming Lei       2023-03-07  474  	/* slave request in fused cmd, won't be one uring cmd */
5e0eebd84413d45 include/linux/io_uring_types.h Ming Lei       2023-03-07 @475  	REQ_F_FUSED_SLAVE	= BIT(REQ_F_FUSED_SLAVE_BIT),
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  476  };
e27f928ee1cb068 io_uring/io_uring_types.h      Jens Axboe     2022-05-24  477  

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

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH V2 00/17] io_uring/ublk: add IORING_OP_FUSED_CMD
@ 2023-03-07 14:15 Ming Lei
  2023-03-07 14:15 ` [PATCH V2 03/17] io_uring: " Ming Lei
  0 siblings, 1 reply; 3+ messages in thread
From: Ming Lei @ 2023-03-07 14:15 UTC (permalink / raw)
  To: Jens Axboe, io-uring
  Cc: linux-block, Miklos Szeredi, ZiyangZhang, Xiaoguang Wang,
	Bernd Schubert, Ming Lei

Hello,

Add IORING_OP_FUSED_CMD, it is one special URING_CMD, which has to
be SQE128. The 1st SQE(master) is one 64byte URING_CMD, and the 2nd
64byte SQE(slave) is another normal 64byte OP. For any OP which needs
to support slave OP, io_issue_defs[op].fused_slave needs to be set as 1,
and its ->issue() can retrieve/import buffer from master request's
fused_cmd_kbuf. The slave OP is actually submitted from kernel, part of
this idea is from Xiaoguang's ublk ebpf patchset, but this patchset
submits slave OP just like normal OP issued from userspace, that said,
SQE order is kept, and batching handling is done too.

Please see detailed design in commit log of the 3th patch, and one big
point is how to handle buffer ownership.

With this way, it is easy to support zero copy for ublk/fuse device.

Basically userspace can specify any sub-buffer of the ublk block request
buffer from the fused command just by setting 'offset/len'
in the slave SQE for running slave OP. This way is flexible to implement
io mapping: mirror, stripped, ...

The 4th & 5th patches enable fused slave support for the following OPs:

	OP_READ/OP_WRITE
	OP_SEND/OP_RECV/OP_SEND_ZC

The other ublk patches cleans ublk driver and implement fused command
for supporting zero copy.

Follows userspace code:

https://github.com/ming1/ubdsrv/tree/fused-cmd-zc-v2

All three(loop, nbd and qcow2) ublk targets have supported zero copy by passing:

	ublk add -t [loop|nbd|qcow2] -z .... 

Basic fs mount/kernel building and builtin test are done.

Also add liburing test case for covering fused command based on miniublk
of blktest:

https://github.com/ming1/liburing/commits/fused_cmd_miniublk

Performance improvement is obvious on memory bandwidth
related workloads, such as, 1~2X improvement on 64K/512K BS
IO test on loop with ramfs backing file.

Any comments are welcome!

V2:
	- don't resue io_mapped_ubuf (io_uring)
	- remove REQ_F_FUSED_MASTER_BIT (io_uring)
	- fix compile warning (io_uring)
	- rebase on v6.3-rc1 (io_uring)
	- grabbing io request reference when handling fused command 
	- simplify ublk_copy_user_pages() by iov iterator
	- add read()/write() for userspace to read/write ublk io buffer, so
	that some corner cases(read zero, passthrough request(report zones)) can
	be handled easily in case of zero copy; this way also helps to switch to
	zero copy completely
	- misc cleanup

Ming Lei (17):
  io_uring: add IO_URING_F_FUSED and prepare for supporting OP_FUSED_CMD
  io_uring: increase io_kiocb->flags into 64bit
  io_uring: add IORING_OP_FUSED_CMD
  io_uring: support OP_READ/OP_WRITE for fused slave request
  io_uring: support OP_SEND_ZC/OP_RECV for fused slave request
  block: ublk_drv: mark device as LIVE before adding disk
  block: ublk_drv: add common exit handling
  block: ublk_drv: don't consider flush request in map/unmap io
  block: ublk_drv: add two helpers to clean up map/unmap request
  block: ublk_drv: clean up several helpers
  block: ublk_drv: cleanup 'struct ublk_map_data'
  block: ublk_drv: cleanup ublk_copy_user_pages
  block: ublk_drv: grab request reference when the request is handled by
    userspace
  block: ublk_drv: support to copy any part of request pages
  block: ublk_drv: add read()/write() support for ublk char device
  block: ublk_drv: don't check buffer in case of zero copy
  block: ublk_drv: apply io_uring FUSED_CMD for supporting zero copy

 drivers/block/ublk_drv.c       | 605 ++++++++++++++++++++++++++-------
 drivers/char/mem.c             |   4 +
 drivers/nvme/host/ioctl.c      |   9 +
 include/linux/io_uring.h       |  49 ++-
 include/linux/io_uring_types.h |  18 +-
 include/uapi/linux/io_uring.h  |   1 +
 include/uapi/linux/ublk_cmd.h  |  37 +-
 io_uring/Makefile              |   2 +-
 io_uring/fused_cmd.c           | 232 +++++++++++++
 io_uring/fused_cmd.h           |  11 +
 io_uring/io_uring.c            |  22 +-
 io_uring/io_uring.h            |   3 +
 io_uring/net.c                 |  23 +-
 io_uring/opdef.c               |  17 +
 io_uring/opdef.h               |   2 +
 io_uring/rw.c                  |  20 ++
 16 files changed, 926 insertions(+), 129 deletions(-)
 create mode 100644 io_uring/fused_cmd.c
 create mode 100644 io_uring/fused_cmd.h

-- 
2.39.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-14  5:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-11 18:18 [PATCH V2 03/17] io_uring: add IORING_OP_FUSED_CMD kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2023-03-14  5:07 kernel test robot
2023-03-07 14:15 [PATCH V2 00/17] io_uring/ublk: " Ming Lei
2023-03-07 14:15 ` [PATCH V2 03/17] io_uring: " Ming Lei

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.