函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__sbitmap_queue_get

函数原型:int __sbitmap_queue_get(struct sbitmap_queue *sbq)

返回类型:int

参数:

类型参数名称
struct sbitmap_queue *sbq
426  hint等于Operations with implied preemption/interrupt protection. These* operations can be used without worrying about preemption or interrupt.( * @alloc_hint: Cache of last successfully allocated or freed bit.* This is per-cpu, which allows multiple users to stick to different* cachelines until the map is exhausted.)
427  depth等于READ_ONCE(@depth: Number of bits used in the whole bitmap.)
428  如果此条件成立可能性小(为编译器优化)(hint >= depth)则
429  hint等于如果depthprandom_u32()取模depth否则0
430  抢占保护下的写CPU( * @alloc_hint: Cache of last successfully allocated or freed bit.* This is per-cpu, which allows multiple users to stick to different* cachelines until the map is exhausted., hint)
432  nr等于sbitmap_get( & @sb: Scalable bitmap., hint, @round_robin: Allocate bits in strict round-robin order.)
434  如果nr恒等于负1则
436  抢占保护下的写CPU( * @alloc_hint: Cache of last successfully allocated or freed bit.* This is per-cpu, which allows multiple users to stick to different* cachelines until the map is exhausted., 0)
437  否则如果nr恒等于hint此条件成立可能性小(为编译器优化)(@round_robin: Allocate bits in strict round-robin order.)则
439  hint等于nr加1
440  如果hint大于等于depth减1则hint等于0
442  抢占保护下的写CPU( * @alloc_hint: Cache of last successfully allocated or freed bit.* This is per-cpu, which allows multiple users to stick to different* cachelines until the map is exhausted., hint)
445  返回:nr
调用者
名称描述
kyber_get_domain_token
__blk_mq_get_tag