函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:blkiolatency_timer_fn

函数原型:static void blkiolatency_timer_fn(struct timer_list *t)

返回类型:void

参数:

类型参数名称
struct timer_list *t
658  blkiolat等于from_timer(blkiolat, t, timer)
661  now等于Convert ktime_t to nanoseconds
663  _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
664  lkg_for_each_descendant_pre - pre-order walk of a blkg's descendants*@d_blkg: loop cursor pointing to the current descendant*@pos_css: used for iteration*@p_blkg: target blkg to walk descendants of* Walk @c_blkg through the descendants of @p_blkg(blkg, pos_css, root_blkg)
675  如果非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.则继续下一循环
678  iolat等于blkg_to_lat(blkg)
679  如果非iolat则转到:next
682  lat_info等于child_lat
683  cookie等于atomic_read( & Cookie to tell if we need to scale up or down. )
685  如果cookie大于等于DEFAULT_SCALE_COOKIE则转到:next
688  spin_lock_irqsave( & lock, flags)
689  如果 Last time we adjusted the scale of everybody. 大于等于now则转到:next_lock
698  转到:next_lock
706  如果now Last time we adjusted the scale of everybody. 大于等于NSEC_PER_SEC乘5则 The guy who actually changed the latency numbers. = NULL
709  next_lock :
710  spin_unlock_irqrestore( & lock, flags)
711  :
712  lkg_put - put a blkg reference*@blkg: blkg to put
714  _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()