函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:We scale the qd down faster than we scale up, so we need to use this helper* to adjust the scale_cookie accordingly so we don't prematurely get* scale_cookie at DEFAULT_SCALE_COOKIE and unthrottle too much

函数原型:static void scale_cookie_change(struct blk_iolatency *blkiolat, struct child_latency_info *lat_info, bool up)

返回类型:void

参数:

类型参数名称
struct blk_iolatency *blkiolat
struct child_latency_info *lat_info
boolup
327  qd等于 Max # of requests
328  scale等于scale_amount(qd, up)
329  old等于atomic_read( & Cookie to tell if we need to scale up or down. )
330  max_scale等于qd左移1位
331  diff等于0
333  如果old小于DEFAULT_SCALE_COOKIEdiff等于DEFAULT_SCALE_COOKIEold
336  如果up
337  如果scaleold大于DEFAULT_SCALE_COOKIEatomic_set( & Cookie to tell if we need to scale up or down. , DEFAULT_SCALE_COOKIE)
340  否则如果diff大于qdatomic_inc( & Cookie to tell if we need to scale up or down. )
342  否则atomic_add(scale, & Cookie to tell if we need to scale up or down. )
344  否则
351  如果diff大于qd
354  否则
调用者
名称描述
iolatency_check_latencies
blkiolatency_timer_fn