函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:io_sq_thread

函数原型:static int io_sq_thread(void *data)

返回类型:int

参数:

类型参数名称
void *data
3855  ctx等于data
3856  struct mm_struct * cur_mm = NULL
3859  DEFINE_WAIT(wait)
3864  mplete: - signals a single thread waiting on this completion*@x: holds the state of this particular completion* This will wake up a single thread waiting on this completion. Threads will be* awakened in the same order in which they were queued.
3866  old_fs等于获取当前进程地址空间上限()
3867  设置寄存器值(fs)
3868  old_cred等于verride_creds - Override the current process's subjective credentials*@new: The credentials to be assigned* Install a set of temporary override subjective credentials on the current* process, returning the old set for later reversion.
3870  ret等于timeout等于inflight等于0
3871  当非kthread_should_park - should this kthread park now?* When someone calls kthread_park() on your kthread, it will be woken* and this will return true循环
3874  如果inflight
3875  nr_events等于0
3877  如果flags按位与_context is polled
3892  否则
3897  nr_events等于inflight
3900  inflight减等于nr_events
3901  如果非inflighttimeout等于jiffiessq_thread_idle
3905  to_submit等于io_sqring_entries(ctx)
3911  如果非to_submitret恒等于负EBUSY
3918  如果cur_mm
3934  cond_resched()
3935  继续下一循环
3944  smp_mb()
3947  如果非to_submitret恒等于负EBUSY
3965  to_submit等于两数取小(to_submit, sq_entries)
3966  mutex_lock( & uring_lock)
3967  ret等于io_submit_sqes(ctx, to_submit, NULL, - 1, & cur_mm, true)
3968  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
3969  如果ret大于0则inflight加等于ret
3973  设置寄存器值(fs)
3974  如果cur_mm
3975  unuse_mm(cur_mm)
3976  Decrement the use count and release all resources for an mm.
3978  vert_creds - Revert a temporary subjective credentials override*@old: The credentials to be restored* Revert a temporary set of override subjective credentials to an old set,* discarding the override set.
3980  kthread_parkme()
3982  返回:0