函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io_uring.c Create Date:2022-07-29 10:55:03
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Fetch an sqe, if one is available. Note that sqe_ptr will point to memory* that is mapped by userspace. This means that care needs to be taken to* ensure that reads are stable, as we cannot rely on userspace always* being a good citizen

函数原型:static bool io_get_sqring(struct io_ring_ctx *ctx, struct io_kiocb *req, const struct io_uring_sqe **sqe_ptr)

返回类型:bool

参数:

类型参数名称
struct io_ring_ctx *ctx
struct io_kiocb *req
const struct io_uring_sqe **sqe_ptr
3739  rings等于rings
3740  sq_array等于* Ring buffer of indices into array of io_uring_sqe, which is * mmapped by the application using the IORING_OFF_SQES offset. * This indirection could e.g. be used to assign fixed * io_uring_sqe entries to operations and only submit them to * the queue when
3751  head等于cached_sq_head
3753  如果此条件成立可能性小(为编译器优化)(head == smp_load_acquire( & tail))则返回:false
3756  head等于READ_ONCE(sq_array[head & sq_mask])
3757  如果此条件成立可能性大(为编译器优化)(head < sq_entries)则
3763  sequence等于cached_sq_head
3764  sqe_ptr等于sq_sqes[head]
3765  opcode等于READ_ONCE(ype of operation for this sqe )
3766  user_data等于READ_ONCE(data to be passed back at completion time )
3767  cached_sq_head自加
3768  返回:true
3772  cached_sq_head自加
3773  cached_sq_dropped自加
3774  WRITE_ONCE(Number of invalid entries dropped by the kernel due to* invalid index stored in array* Written by the kernel, shouldn't be modified by the* application (i, cached_sq_dropped)
3775  返回:false
调用者
名称描述
io_submit_sqes