Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__sbitmap_queue_get

Proto:int __sbitmap_queue_get(struct sbitmap_queue *sbq)

Type:int

Parameter:

TypeParameterName
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  If Value for the false possibility is greater at compile time(hint >= depth) Then
429  hint = If depth Then prandom_u32() % depth Else 0
430  this_cpu_write( * @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  If nr == -1 Then
436  this_cpu_write( * @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  Else if nr == hint || Value for the false possibility is greater at compile time(@round_robin: Allocate bits in strict round-robin order.) Then
439  hint = nr + 1
440  If hint >= depth - 1 Then hint = 0
442  this_cpu_write( * @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  Return nr
Caller
NameDescribe
kyber_get_domain_token