Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:io_worker_handle_work

Proto:static void io_worker_handle_work(struct io_worker *worker)__releases(wqe->lock)

Type:void

Parameter:

TypeParameterName
struct io_worker *worker
408  struct io_wq_work * work, * old_work = NULL, * put_work = NULL
409  wqe = wqe
410  wq = wq
412  Do
413  hash = -1U
422  work = io_get_next_work(wqe, & hash)
423  If work Then Worker will start processing some work. Move it to the busy list, if* it's currently on the freelist
425  Else if Not wq_list_empty( & work_list) Then flags |= IO_WQE_FLAG_STALLED
428  spin_unlock_irq( & lock)
429  If put_work && put_work Then put_work(old_work)
431  If Not work Then Break
433  :
435  If signal_pending(current process) Then Flush all pending signals for this kthread.
438  cond_resched()
440  spin_lock_irq( & lock)
441  cur_work = work
442  spin_unlock_irq( & lock)
444  If flags & IO_WQ_WORK_CB Then func( & work)
447  If flags & IO_WQ_WORK_NEEDS_FILES && files != files Then
450  files = files
453  If flags & IO_WQ_WORK_NEEDS_USER && Not mm && mm Then
455  If mmget_not_zero(mm) Then
459  Else
463  If Not creds Then creds = 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.
465  If fs && fs != fs Then fs = fs
467  If st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then flags |= IO_WQ_WORK_CANCEL
469  If mm Then flags |= IO_WQ_WORK_HAS_MM
472  If get_work && Not (flags & IO_WQ_WORK_INTERNAL) Then
473  put_work = work
474  get_work(work)
477  old_work = work
478  func( & work)
480  spin_lock_irq( & lock)
481  cur_work = NULL
482  spin_unlock_irq( & lock)
484  spin_lock_irq( & lock)
486  If hash != -1U Then
487  hash_map &= ~BIT_ULL(hash)
490  If work && work != old_work Then
491  spin_unlock_irq( & lock)
493  If put_work && put_work Then
495  put_work = NULL
499  hash = -1U
500  Go to next
502  When 1 cycle
Caller
NameDescribe
io_wqe_worker