函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:io_worker_exit

函数原型:static void io_worker_exit(struct io_worker *worker)

返回类型:void

参数:

类型参数名称
struct io_worker *worker
198  wqe等于wqe
199  acct等于io_wqe_get_acct(wqe, worker)
206  set_current_state(睡眠态)
207  如果非_dec_and_test - decrement a refcount and test if it is 0*@r: the refcount* Similar to atomic_dec_and_test(), it will WARN on underflow and fail to* decrement when saturated at REFCOUNT_SATURATED进程调度
209  set_current_state() includes a barrier so that the write of current->state* is correctly serialised wrt the caller's subsequent test of whether to* actually sleep:* for (;;) {* set_current_state(TASK_UNINTERRUPTIBLE);* if (!need_sleep)* break;* (就绪态)
211  禁止抢占()
212  flags与等于Task is an IO worker 的反
213  如果flags按位与IO_WORKER_F_RUNNINGatomic_dec( & nr_running)
215  如果非flags按位与IO_WORKER_F_BOUND的值则atomic_dec( & processes)
217  flags等于0
218  禁用抢占和中断()
220  spin_lock_irq( & lock)
221  hlist_nulls_del_rcu - deletes entry from hash list without re-initialization*@n: the element to delete from the hash list.* Note: hlist_nulls_unhashed() on entry does not return true after this,* the entry is in an undefined state
222  删除不需要重新初始化的列表项
223  如果Note: drops the wqe->lock if returning true! The caller must re-acquire* the lock in that case. Some callers need to restart handling if this* happens, so we can't just re-acquire the lock on behalf of the caller.
224  __release( & lock)
225  spin_lock_irq( & lock)
227  nr_workers自减
228  nr_workers等于nr_workersnr_workers
230  spin_unlock_irq( & lock)
233  如果非nr_workers_dec_and_test - decrement a refcount and test if it is 0*@r: the refcount* Similar to atomic_dec_and_test(), it will WARN on underflow and fail to* decrement when saturated at REFCOUNT_SATURATEDmplete: - 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.
236  kfree_rcu() - kfree an object after a grace period(worker, rcu)
调用者
名称描述
io_wqe_worker