函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:io_worker_handle_work

函数原型:static void io_worker_handle_work(struct io_worker *worker)__releases(wqe->lock)

返回类型:void

参数:

类型参数名称
struct io_worker *worker
408  struct io_wq_work * work, * old_work = NULL, * put_work = NULL
409  wqe等于wqe
410  wq等于wq
412  循环
413  hash等于负1U
422  work等于io_get_next_work(wqe, & hash)
423  如果workWorker will start processing some work. Move it to the busy list, if* it's currently on the freelist
425  否则如果非wq_list_empty( & work_list)则flags或等于IO_WQE_FLAG_STALLED
428  spin_unlock_irq( & lock)
429  如果put_workput_workput_work(old_work)
431  如果非work退出
433  :
435  如果signal_pending(当前进程)则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  如果flags按位与IO_WQ_WORK_CBfunc( & work)
447  如果flags按位与IO_WQ_WORK_NEEDS_FILESfiles不等于files
450  files等于files
453  如果flags按位与IO_WQ_WORK_NEEDS_USER且非mmmm
455  如果mmget_not_zero(mm)则
459  否则
460  flags或等于IO_WQ_WORK_CANCEL
463  如果非credscreds等于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  如果fsfs不等于fsfs等于fs
467  如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting fromflags或等于IO_WQ_WORK_CANCEL
469  如果mmflags或等于IO_WQ_WORK_HAS_MM
472  如果get_work且非flags按位与IO_WQ_WORK_INTERNAL的值则
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  如果hash不等于负1U则
487  hash_map与等于BIT_ULL(hash)的反
488  flags与等于IO_WQE_FLAG_STALLED的反
490  如果workwork不等于old_work
491  spin_unlock_irq( & lock)
493  如果put_workput_work
495  put_work = NULL
499  hash等于负1U
500  转到:next
502  当1循环
调用者
名称描述
io_wqe_worker