Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:io_sq_thread

Proto:static int io_sq_thread(void *data)

Type:int

Parameter:

TypeParameterName
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 = get_fs()
3867  set_fs(USER_DS)
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  When Not 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 cycle
3874  If inflight Then
3875  nr_events = 0
3877  If flags & _context is polled Then
3892  Else
3897  nr_events = inflight
3900  inflight -= nr_events
3901  If Not inflight Then timeout = jiffies + sq_thread_idle
3905  to_submit = io_sqring_entries(ctx)
3911  If Not to_submit || ret == -EBUSY Then
3918  If cur_mm Then
3934  cond_resched()
3935  Continue
3944  smp_mb()
3947  If Not to_submit || ret == -EBUSY Then
3965  to_submit = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(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  If ret > 0 Then inflight += ret
3973  set_fs(old_fs)
3974  If cur_mm Then
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  Return 0