Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:wbt_init

Proto:int wbt_init(struct request_queue *q)

Type:int

Parameter:

TypeParameterName
struct request_queue *q
825  rwb = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
826  If Not rwb Then Return -ENOMEM
829  cb = blk_stat_alloc_callback(wb_timer_fn, wbt_data_dir, 2, rwb)
830  If Not cb Then
831  kfree(rwb)
832  Return -ENOMEM
835  When i < WBT_NUM_RWQ cycle rq_wait_init( & rq_wait[i])
838  id = RQ_QOS_WBT
839  ops = wbt_rqos_ops
840  q = q
841  last non-throttled comp = last non-throttled issue = jiffies
842  default window size = RWB_WINDOW_NSEC
843  WBT_STATE_* = WBT_STATE_ON_DEFAULT
844  wc = 1
845  default_depth = RWB_DEF_DEPTH
846  __wbt_update_limits(rwb)
851  rq_qos_add(q, & rqos)
852  blk_stat_add_callback(q, cb)
854  min_lat_nsec = wbt_default_latency_nsec(q)
856  wbt_queue_depth_changed( & rqos)
857  wbt_set_write_cache(q, Determine whether a bit is set(Write back caching , & * various queue flags, see QUEUE_* below))
859  Return 0
Caller
NameDescribe
wbt_enable_defaultEnable wbt if defaults are configured that way