Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:blkiolatency_timer_fn

Proto:static void blkiolatency_timer_fn(struct timer_list *t)

Type:void

Parameter:

TypeParameterName
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  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 Continue
678  iolat = blkg_to_lat(blkg)
679  If Not iolat Then Go to next
682  lat_info = child_lat
683  cookie = atomic_read( & Cookie to tell if we need to scale up or down. )
685  If cookie >= DEFAULT_SCALE_COOKIE Then Go to next
688  spin_lock_irqsave( & lock, flags)
689  If Last time we adjusted the scale of everybody. >= now Then Go to next_lock
698  Go to next_lock
706  If now - Last time we adjusted the scale of everybody. >= NSEC_PER_SEC * 5 Then 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()