Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sbitmap_get_shallow

Proto:int sbitmap_get_shallow(struct sbitmap *sb, unsigned int alloc_hint, unsigned long shallow_depth)

Type:int

Parameter:

TypeParameterName
struct sbitmap *sb
unsigned intalloc_hint
unsigned longshallow_depth
196  nr = -1
198  index = SB_NR_TO_INDEX(sb, alloc_hint)
200  When i < @map_nr: Number of words (cachelines) being used for the bitmap. cycle
201  again :
202  nr = __sbitmap_get_word( & @word: word holding free bits, min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(@depth: Number of bits being used in @word/@cleared, shallow_depth), SB_NR_TO_BIT(sb, alloc_hint), true)
205  If nr != -1 Then
207  Break
210  If See if we have deferred clears that we can batch move Then Go to again
214  index++
215  alloc_hint = index << @shift: log2(number of bits used per word)
218  index = 0
219  alloc_hint = 0
223  Return nr
Caller
NameDescribe
__sbitmap_queue_get_shallow