函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Check our parent and see if the scale cookie has changed.

函数原型:static void check_scale_change(struct iolatency_grp *iolat)

返回类型:void

参数:

类型参数名称
struct iolatency_grp *iolat
396  our_cookie等于atomic_read( & scale_cookie)
399  direction等于0
401  如果( all non-root blkcg_gq's are guaranteed to have access to parent == NULL)则返回
404  parent等于blkg_to_lat( all non-root blkcg_gq's are guaranteed to have access to parent )
405  如果非parent则返回
408  lat_info等于child_lat
409  cur_cookie等于atomic_read( & Cookie to tell if we need to scale up or down. )
410  scale_lat等于READ_ONCE( The latency that we missed. )
412  如果cur_cookie小于our_cookiedirection等于负1
414  否则如果cur_cookie大于our_cookiedirection等于1
416  否则返回
419  old等于atomic_cmpxchg( & scale_cookie, our_cookie, cur_cookie)
422  如果old不等于our_cookie则返回
425  如果direction小于0且min_lat_nsec
428  如果非scale_latmin_lat_nsec小于等于scale_lat则返回
437  samples_thresh等于 Total io's from all of our children for the last summation. 乘5
438  samples_thresh等于两数取大(1ULL, div64_u64 - unsigned 64bit divide with 64bit divisor*@dividend: 64bit dividend*@divisor: 64bit divisor* This implementation is a modified version of the algorithm proposed* by the book 'Hacker's Delight'. The original source and full proof)
439  如果 Our current number of IO's for the last summation. 小于等于samples_thresh则返回
444  如果max_depth恒等于1且direction小于0则
445  blkcg_use_delay(lat_to_blkg(iolat))
446  返回
450  如果cur_cookie恒等于DEFAULT_SCALE_COOKIE
451  blkcg_clear_delay(lat_to_blkg(iolat))
452  max_depth等于UINT_MAX
453  wake_up_all( & wait)
454  返回
457  Change the queue depth of the iolatency_grp. We add/subtract 1/16th of the* queue depth at a time so we don't get wild swings and hopefully dial in to* fairer distribution of the overall queue depth.
调用者
名称描述
blkcg_iolatency_throttle