Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-cgroup.c Create Date:2022-07-28 17:40:58
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:lkcg_maybe_throttle_current - throttle the current task if it has been marked* This is only called if we've been marked with set_notify_resume()

Proto:void blkcg_maybe_throttle_current(void)

Type:void

Parameter:Nothing

1623  q = throttle_queue
1627  use_memdelay = use_memdelay
1629  If Not q Then Return
1632  throttle_queue = NULL
1633  use_memdelay = false
1635  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1636  css = kthread_blkcg - get associated blkcg css of current kthread* Current thread must be a kthread.
1637  If css Then blkcg = css_to_blkcg(css)
1639  Else blkcg = css_to_blkcg(ask_css - obtain css for (task, subsys)*@task: the target task*@subsys_id: the target subsystem ID* See task_css_check().)
1642  If Not blkcg Then Go to out
1644  blkg = lkg_lookup - lookup blkg for the specified blkcg - q pair*@blkcg: blkcg of interest*@q: request_queue of interest* Lookup blkg for the @blkcg - @q pair. This function should be called* under RCU read lock.
1645  If Not blkg Then Go to out
1647  If Not lkg_tryget - try and get a blkg reference*@blkg: blkg to get* This is for use when doing an RCU lookup of the blkg. We may be in the midst* of freeing this blkg, so we can only use it if the refcnt is not zero. Then Go to out
1649  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1651  This is called when we want to actually walk up the hierarchy and check to* see if we need to throttle, and then actually throttle if there is some* accumulated delay. This should only be called upon return to user space so
1652  lkg_put - put a blkg reference*@blkg: blkg to put
1653  blk_put_queue(q)
1654  Return
1655  out :
1656  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1657  blk_put_queue(q)