函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:For shared tag users, we track the number of currently active users* and attempt to provide a fair share of the tag depth for each of them.

函数原型:static inline bool hctx_may_queue(struct blk_mq_hw_ctx *hctx, struct sbitmap_queue *bt)

返回类型:bool

参数:

类型参数名称
struct blk_mq_hw_ctx *hctx
struct sbitmap_queue *bt
68  如果非hctx或非@flags: BLK_MQ_F_* flags. Defines the behaviour of the queue. 按位与BLK_MQ_F_TAG_SHARED的值则返回:true
70  如果非test_bit(BLK_MQ_S_TAG_ACTIVE, & @state: BLK_MQ_S_* flags. Defines the state of the hw* queue (active, scheduled to restart, stopped).)则返回:true
76  如果@depth: Number of bits used in the whole bitmap.恒等于1则返回:true
79  users等于atomic_read( & active_queues)
80  如果非users则返回:true
86  depth等于两数取大((@depth: Number of bits used in the whole bitmap. + users - 1) / users, 4U)
87  返回:atomic_read( & @nr_active: Number of active requests. Only used when a tag set is* shared across request queues.)小于depth
调用者
名称描述
__blk_mq_get_tag