函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Manager thread. Tasked with creating new workers, if we need them.

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

返回类型:int

参数:

类型参数名称
void *data
662  wq等于data
663  workers_to_create等于num_possible_nodes()
667  _set - set a refcount's value*@r: the refcount*@n: value to which the refcount will be set
668  for_each_node(node)
669  如果非NUMA节点状态(node)则继续下一循环
671  如果非create_io_worker(wq, wqes[node], IO_WQ_ACCT_BOUND)则转到:err
673  workers_to_create自减
676 workers_to_create自减循环
677  _dec - decrement a refcount*@r: the refcount* Similar to atomic_dec(), it will WARN on underflow and fail to decrement* when saturated at REFCOUNT_SATURATED.* Provides release memory ordering, such that prior loads and stores are done* before.
679  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.
681  当非kthread_should_stop - should this kthread return now?* When someone calls kthread_stop() on your kthread, it will be woken* and this will return true. You should then return, and your return* value will be passed through to kthread_stop().循环
683  wqe等于wqes[node]
686  如果非NUMA节点状态(node)则继续下一循环
689  spin_lock_irq( & lock)
694  spin_unlock_irq( & lock)
700  set_current_state(睡眠态)
701  schedule_timeout - sleep until timeout*@timeout: timeout value in jiffies* Make the current task sleep until @timeout jiffies have* elapsed
704  返回:0
705  err :
706  设置内存位
707  设置内存位
708  如果_sub_and_test - subtract from a refcount and test if it is 0*@i: amount to subtract from the refcount*@r: the refcount* Similar to atomic_dec_and_test(), but it will WARN, return false and* ultimately leak on underflow and will fail to decrement when 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.
710  返回:0