Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:This is Schlemiel the Painter's algorithm. It should be called after* all other tests for the same bitmap because it sets all bits of bitmap to 1.

Proto:static int __init test_find_first_bit(void *bitmap, unsigned long len)

Type:int

Parameter:

TypeParameterName
void *bitmap
unsigned longlen
41  time = ktime_get()
42  When i < len cycle
43  i = find the first set bit in a memory region(bitmap, len)
44  __clear_bit - Clears a bit in memory*@nr: the bit to clear*@addr: the address to start counting from* Unlike clear_bit(), this function is non-atomic. If it is called on the same* region of memory concurrently, the effect may be that only one operation
46  time = ktime_get() - time
47  pr_err("find_first_bit: %18llu ns, %6ld iterations\n", time, cnt)
49  Return 0
Caller
NameDescribe
find_bit_test