Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io_uring.c Create Date:2022-07-28 20:22:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:io_sq_offload_start

Proto:static int io_sq_offload_start(struct io_ring_ctx *ctx, struct io_uring_params *p)

Type:int

Parameter:

TypeParameterName
struct io_ring_ctx *ctx
struct io_uring_params *p
4564  init_waitqueue_head( & sqo_wait)
4565  mmgrab() - Pin a &struct mm_struct
4566  sqo_mm = mm
4568  If flags & SQ poll thread Then
4569  ret = -EPERM
4570  If Not Check operation authority Then Go to err
4573  sq_thread_idle = msecs_to_jiffies: - convert milliseconds to jiffies*@m: time in milliseconds* conversion is done as follows:* - negative values mean 'infinite timeout' (MAX_JIFFY_OFFSET)* - 'too large' values [that would result in larger than
4574  If Not sq_thread_idle Then sq_thread_idle = HZ
4577  If flags & sq_thread_cpu is valid Then
4578  cpu = sq_thread_cpu
4580  ret = -EINVAL
4583  If Not cpu_online(cpu) Then Go to err
4589  Else
4596  Go to err
4598  wake_up_process - Wake up a specific process*@p: The process to be woken up.* Attempt to wake up the nominated process and move it to the set of runnable* processes.* Return: 1 if the process was woken up, 0 if it was already running.
4599  Else if flags & sq_thread_cpu is valid Then
4601  ret = -EINVAL
4602  Go to err
4605  mm = sqo_mm
4606  user = user
4607  creds = creds
4608  get_work = io_get_work
4609  put_work = io_put_work
4612  concurrency = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(sq_entries, 4 * num_online_cpus())
4613  IO offload = io_wq_create(concurrency, & data)
4614  If IS_ERR( IO offload ) Then
4615  ret = PTR_ERR( IO offload )
4616  IO offload = NULL
4617  Go to err
4620  Return 0
4621  err :
4622  io_finish_async(ctx)
4623  mmdrop(sqo_mm)
4624  sqo_mm = NULL
4625  Return ret
Caller
NameDescribe
io_uring_create