函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:blk_throtl_init

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

返回类型:int

参数:

类型参数名称
struct request_queue *q
2429  td等于根据内存节点分配内存
2430  如果非td则返回:负ENOMEM
2432  latency_buckets[generic data direction definitions ]等于__alloc_percpu - allocate dynamic percpu area*@size: size of area to allocate in bytes*@align: alignment of area (max PAGE_SIZE)* Equivalent to __alloc_percpu_gfp(size, align, %GFP_KERNEL).
2434  如果非latency_buckets[generic data direction definitions ]则
2435  释放内存
2436  返回:负ENOMEM
2438  latency_buckets[WRITE]等于__alloc_percpu - allocate dynamic percpu area*@size: size of area to allocate in bytes*@align: alignment of area (max PAGE_SIZE)* Equivalent to __alloc_percpu_gfp(size, align, %GFP_KERNEL).
2440  如果非latency_buckets[WRITE]则
2441  释放内存
2442  释放内存
2443  返回:负ENOMEM
2446  INIT_WORK( & Work for dispatching throttled bios , lk_throtl_dispatch_work_fn - work function for throtl_data->dispatch_work*@work: work item being executed* This function is queued for execution when bio's reach the bio_lists[]* of throtl_data->service_queue. Those bio's are ready and issued by this)
2447  a service_queue, assumes the caller zeroed it
2449  Throttle data 等于td
2450  queue等于q
2452  limit_valid[LIMIT_MAX] = true
2453  limit_index等于LIMIT_MAX
2454  low_upgrade_time等于jiffies
2455  low_downgrade_time等于jiffies
2458  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
2459  如果ret
2460  释放内存
2461  释放内存
2462  释放内存
2464  返回:ret