Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:test_bucket_stats

Proto:static void test_bucket_stats(struct rhashtable *ht, unsigned int entries)

Type:void

Parameter:

TypeParameterName
struct rhashtable *ht
unsigned intentries
177  total = 0 , chain_len = 0
181  hashtable_walk_enter - Initialise an iterator*@ht: Table to walk over*@iter: Hash table Iterator* This function prepares a hash table walk.* Note that if you restart a walk after rhashtable_walk_stop you* may see the same object twice
182  rhashtable_walk_start( & hti)
184  When pos = hashtable_walk_next - Return the next object and advance the iterator*@iter: Hash table iterator* Note that you must call rhashtable_walk_stop when you are finished* with the walk.* Returns the next object or NULL when the end of the table is reached. cycle
185  If PTR_ERR(pos) == -EAGAIN Then
186  pr_info("Info: encountered resize\n")
187  chain_len++
188  Continue
189  Else if IS_ERR(pos) Then
190  pr_warn("Test failed: rhashtable_walk_next() error: %ld\n", PTR_ERR(pos))
192  Break
195  total++
198  hashtable_walk_stop - Finish a hash table walk*@iter: Hash table iterator* Finish a hash table walk. Does not reset the iterator to the start of the* hash table.
199  hashtable_walk_exit - Free an iterator*@iter: Hash table Iterator* This function frees resources allocated by rhashtable_walk_enter.
201  pr_info(" Traversal complete: counted=%u, nelems=%u, entries=%d, table-jumps=%u\n", total, atomic_read( & nelems), entries, chain_len)
204  If total != atomic_read( & nelems) || total != entries Then pr_warn("Test failed: Total count mismatch ^^^")
Caller
NameDescribe
test_rhashtable