Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:static void scale_cookie_change(struct blk_iolatency *blkiolat, struct child_latency_info *lat_info, bool up)

Type:void

Parameter:

TypeParameterName
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  If old < DEFAULT_SCALE_COOKIE Then diff = DEFAULT_SCALE_COOKIE - old
336  If up Then
337  If scale + old > DEFAULT_SCALE_COOKIE Then atomic_set( & Cookie to tell if we need to scale up or down. , DEFAULT_SCALE_COOKIE)
340  Else if diff > qd Then atomic_inc( & Cookie to tell if we need to scale up or down. )
342  Else atomic_add(scale, & Cookie to tell if we need to scale up or down. )
344  Else
351  If diff > qd Then
354  Else
Caller
NameDescribe
iolatency_check_latencies
blkiolatency_timer_fn