函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:calc_vtime_cost_builtin

函数原型:static void calc_vtime_cost_builtin(struct bio *bio, struct ioc_gq *iocg, bool is_merge, u64 *costp)

返回类型:void

参数:

类型参数名称
struct bio *bio
struct ioc_gq *iocg
boolis_merge
u64 *costp
1633  ioc等于ioc
1635  pages等于max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u64, bio_sectors(bio) >> IOC_SECT_TO_PAGE_SHIFT, 1)
1636  seek_pages等于0
1637  cost等于0
1640  :bio_op(bio)恒等于REQ_OP_READ
1641  coef_seqio等于lcoefs[LCOEF_RSEQIO]
1642  coef_randio等于lcoefs[LCOEF_RRANDIO]
1643  coef_page等于lcoefs[LCOEF_RPAGE]
1644  退出
1645  :bio_op(bio)恒等于REQ_OP_WRITE
1646  coef_seqio等于lcoefs[LCOEF_WSEQIO]
1647  coef_randio等于lcoefs[LCOEF_WRANDIO]
1648  coef_page等于lcoefs[LCOEF_WPAGE]
1649  退出
1650  默认
1651  转到:out
1654  如果 to detect randio
1655  seek_pages等于abs - return absolute value of an argument*@x: the value. If it is unsigned type, it is converted to signed type first.* char is treated as if it was signed (regardless of whether it really is)* but the macro's return type is preserved as char.( device address in 512 byte sectors - to detect randio )
1656  seek_pages右移等于IOC_SECT_TO_PAGE_SHIFT
1659  如果非is_merge
1660  如果seek_pages大于LCOEF_RANDIO_PAGES
1661  cost加等于coef_randio
1662  否则
1663  cost加等于coef_seqio
1666  cost加等于pagescoef_page
1667  out :
1668  costp等于cost
调用者
名称描述
calc_vtime_cost