Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ioc_rqos_merge

Proto:static void ioc_rqos_merge(struct rq_qos *rqos, struct request *rq, struct bio *bio)

Type:void

Parameter:

TypeParameterName
struct rq_qos *rqos
struct request *rq
struct bio *bio
1801  iocg = blkg_to_iocg(* Represents the association of the css and request_queue for the bio. * If a bio goes direct to device, it will not have a blkg as it will * not have a request_queue associated with it. The reference is put * on release of the bio.)
1802  ioc = ioc
1803  bio_end = bio_end_sector(bio)
1809  If Not enabled || Not this iocg's depth in the hierarchy and ancestors including self Then Return
1812  abs_cost = calc_vtime_cost(bio, iocg, true)
1813  If Not abs_cost Then Return
1816  ake a snapshot of the current [v]time and vrate
1817  current_hweight(iocg, NULL, & hw_inuse)
1818  cost = Scale @abs_cost to the inverse of @hw_inuse. The lower the hierarchical* weight, the more expensive each IO. Must round up.
1821  If lk_rq_pos() : the current sector* blk_rq_bytes() : bytes left in the entire request* blk_rq_cur_bytes() : bytes left in the current segment* blk_rq_err_bytes() : bytes left till the next error boundary* blk_rq_sectors() : sectors left in the entire < bio_end && lk_rq_pos() : the current sector* blk_rq_bytes() : bytes left in the entire request* blk_rq_cur_bytes() : bytes left in the current segment* blk_rq_err_bytes() : bytes left till the next error boundary* blk_rq_sectors() : sectors left in the entire + blk_rq_sectors(rq) == to detect randio Then to detect randio = bio_end
1830  If bio && bi_iocost_cost && time_before_eq64(atomic64_read( & * `vtime` is this iocg's vtime cursor which progresses as IOs are * issued. If lagging behind device vtime, the delta represents * the currently available IO budget. If runnning ahead, the * overage. * `vtime_done` is the same but progressed on completion ) + cost, vnow) Then iocg_commit_bio(iocg, bio, cost)
1833  Else atomic64_add(abs_cost, & abs_vdebt)