函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:blk_iocost_init

函数原型:static int blk_iocost_init(struct request_queue *q)

返回类型:int

参数:

类型参数名称
struct request_queue *q
1917  ioc等于分配内存并置零
1918  如果非ioc则返回:负ENOMEM
1921  pcpu_stat等于alloc_percpu(structioc_pcpu_stat)
1922  如果非pcpu_stat
1923  释放内存
1924  返回:负ENOMEM
1927  rqos等于rqos
1928  id等于RQ_QOS_COST
1929  ops等于ioc_rqos_ops
1930  q等于q
1932  spin_lock_init( & lock)
1933  imer_setup - prepare a timer for first use*@timer: the timer in question*@callback: the function to call when timer expires*@flags: any TIMER_* flags* Regular timer initialization should use either DEFINE_TIMER() above,* or timer_setup()( & timer, ioc_timer_fn, 0)
1934  初始化链表头
1936  running等于IOC_IDLE
1937  atomic64_set( & vtime_rate, VTIME_PER_USEC)
1938  seqcount_init( & period_seqcount)
1939  wallclock starttime 等于ktime_to_us(ktime_get())
1940  atomic64_set( & c'd each period , 0)
1941  atomic_set( & r lazy hweights , 0)
1943  spin_lock_irq( & lock)
1944  autop_idx等于AUTOP_INVALID
1945  ioc_refresh_params(ioc, true)
1946  spin_unlock_irq( & lock)
1948  rq_qos_add(q, rqos)
1949  ret等于lkcg_activate_policy - activate a blkcg policy on a request_queue*@q: request_queue of interest*@pol: blkcg policy to activate* Activate @pol on @q
1950  如果ret
1951  rq_qos_del(q, rqos)
1952  释放内存
1953  释放内存
1954  返回:ret
1956  返回:0
调用者
名称描述
ioc_qos_write
ioc_cost_model_write