Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bfq_update_rate_reset

Proto:static void bfq_update_rate_reset(struct bfq_data *bfqd, struct request *rq)

Type:void

Parameter:

TypeParameterName
struct bfq_data *bfqd
struct request *rq
3049  If number of samples in current observation interval < Min number of samples required to perform peak-rate update || time elapsed from first dispatch in current observ. interval (us) < Min observation time interval required to perform a peak-rate update (ns) Then Go to reset_computation
3059  time elapsed from first dispatch in current observ. interval (us) = max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u64, time elapsed from first dispatch in current observ. interval (us) , time of last request completion (ns) - time of first rq dispatch in current observation interval (ns) )
3067  rate = div64_ul( total num of sectors transferred in current observation interval << Shift used for peak-rate fixed precision calculations, div_u64 - unsigned 64bit divide with 32bit divisor*@dividend: unsigned 64bit dividend*@divisor: unsigned 32bit divisor* This is the most common 64bit divide and should be used if possible,* as many 32bit archs can optimize this variant better than a full )
3076  If num of samples of seq dispatches in current observation interval < 3 * number of samples in current observation interval >> 2 && rate <= * Current estimate of the device peak rate, measured in * [(sectors/usec) / 2^BFQ_RATE_SHIFT]. The left-shift by * BFQ_RATE_SHIFT is performed to increase precision in * fixed-point calculations. || rate > 20 << Shift used for peak-rate fixed precision calculations Then Go to reset_computation
3104  weight = 9 * num of samples of seq dispatches in current observation interval / number of samples in current observation interval
3110  weight = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u32, 8, div_u64 - unsigned 64bit divide with 32bit divisor*@dividend: unsigned 64bit dividend*@divisor: unsigned 32bit divisor* This is the most common 64bit divide and should be used if possible,* as many 32bit archs can optimize this variant better than a full )
3118  divisor = 10 - weight
3125  * Current estimate of the device peak rate, measured in * [(sectors/usec) / 2^BFQ_RATE_SHIFT]. The left-shift by * BFQ_RATE_SHIFT is performed to increase precision in * fixed-point calculations. *= divisor - 1
3126  * Current estimate of the device peak rate, measured in * [(sectors/usec) / 2^BFQ_RATE_SHIFT]. The left-shift by * BFQ_RATE_SHIFT is performed to increase precision in * fixed-point calculations. /= divisor
3127  rate /= divisor
3129  * Current estimate of the device peak rate, measured in * [(sectors/usec) / 2^BFQ_RATE_SHIFT]. The left-shift by * BFQ_RATE_SHIFT is performed to increase precision in * fixed-point calculations. += rate
3138  * Current estimate of the device peak rate, measured in * [(sectors/usec) / 2^BFQ_RATE_SHIFT]. The left-shift by * BFQ_RATE_SHIFT is performed to increase precision in * fixed-point calculations. = max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u32, 1, * Current estimate of the device peak rate, measured in * [(sectors/usec) / 2^BFQ_RATE_SHIFT]. The left-shift by * BFQ_RATE_SHIFT is performed to increase precision in * fixed-point calculations.)
3140  Update parameters related to throughput and responsiveness, as a* function of the estimated peak rate. See comments on* bfq_calc_max_budget(), and on the ref_wr_duration array.
3142  reset_computation :
3143  bfq_reset_rate_computation(bfqd, rq)
Caller
NameDescribe
bfq_update_peak_rateUpdate the read/write peak rate (the main quantity used for* auto-tuning, see update_thr_responsiveness_params())
bfq_completed_request