Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Manager thread. Tasked with creating new workers, if we need them.

Proto:static int io_wq_manager(void *data)

Type:int

Parameter:

TypeParameterName
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  If Not node_online(node) Then Continue
671  If Not create_io_worker(wq, wqes[node], IO_WQ_ACCT_BOUND) Then Go to err
673  workers_to_create--
676  When workers_to_create-- cycle
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  When Not 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(). cycle
683  wqe = wqes[node]
686  If Not node_online(node) Then Continue
689  spin_lock_irq( & lock)
694  spin_unlock_irq( & lock)
700  set_current_state(TASK_INTERRUPTIBLE)
701  schedule_timeout - sleep until timeout*@timeout: timeout value in jiffies* Make the current task sleep until @timeout jiffies have* elapsed
704  Return 0
705  err :
706  Atomically set a bit in memory
707  Atomically set a bit in memory
708  If _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 Then 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  Return 0