函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ioc_rqos_merge

函数原型:static void ioc_rqos_merge(struct rq_qos *rqos, struct request *rq, struct bio *bio)

返回类型:void

参数:

类型参数名称
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  如果非enabled或非 this iocg's depth in the hierarchy and ancestors including self 则返回
1812  abs_cost等于calc_vtime_cost(bio, iocg, true)
1813  如果非abs_cost则返回
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  如果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_endlk_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 to detect randio 等于bio_end
1830  如果biobi_iocost_costtime_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)则iocg_commit_bio(iocg, bio, cost)
1833  否则atomic64_add(abs_cost, & abs_vdebt)