函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:test_rhashtable

函数原型:static s64 __init test_rhashtable(struct rhashtable *ht, struct test_obj *array, unsigned int entries)

返回类型:s64

参数:

类型参数名称
struct rhashtable *ht
struct test_obj *array
unsigned intentries
213  insert_retries等于0
220  打印信息(" Adding %d keys\n", entries)
221  start等于ktime_get_ns()
222 i小于entries循环
223  obj等于array[i]
225  id等于i乘2
226  err等于insert_retry(ht, obj, test_rht_params)
227  如果err大于0则insert_retries加等于err
229  否则如果err则返回:err
233  如果insert_retries打印信息(" %u insertions retried due to memory pressure\n", insert_retries)
237  test_bucket_stats(ht, entries)
238  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
239  test_rht_lookup(ht, array, entries)
240  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
242  test_bucket_stats(ht, entries)
244  打印信息(" Deleting %d keys\n", entries)
245 i小于entries循环
246  struct test_obj_val key = {id = i * 2, }
250  如果id不等于TEST_INSERT_FAIL
252  BUG_ON(!obj)
257  cond_resched()
260  end等于ktime_get_ns()
261  打印信息(" Duration of test: %lld ns\n", end - start)
263  返回:endstart
调用者
名称描述
test_rht_init