函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-cgroup.c Create Date:2022-07-27 19:16:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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()

函数原型:void blkcg_maybe_throttle_current(void)

返回类型:void

参数:

1623  q等于throttle_queue
1627  use_memdelay等于use_memdelay
1629  如果非q则返回
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  如果cssblkcg等于css_to_blkcg(css)
1639  否则blkcg等于css_to_blkcg(循环获得css)
1642  如果非blkcg则转到: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  如果非blkg则转到:out
1647  如果非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.则转到: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  返回
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)