Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:test_rhashtable

Proto:static s64 __init test_rhashtable(struct rhashtable *ht, struct test_obj *array, unsigned int entries)

Type:s64

Parameter:

TypeParameterName
struct rhashtable *ht
struct test_obj *array
unsigned intentries
213  insert_retries = 0
220  pr_info(" Adding %d keys\n", entries)
221  start = ktime_get_ns()
222  When i < entries cycle
223  obj = array[i]
225  id = i * 2
226  err = insert_retry(ht, obj, test_rht_params)
227  If err > 0 Then insert_retries += err
229  Else if err Then Return err
233  If insert_retries Then pr_info(" %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  pr_info(" Deleting %d keys\n", entries)
245  When i < entries cycle
246  struct test_obj_val key = {id = i * 2, }
250  If id != TEST_INSERT_FAIL Then
252  BUG_ON(!obj)
257  cond_resched()
260  end = ktime_get_ns()
261  pr_info(" Duration of test: %lld ns\n", end - start)
263  Return end - start
Caller
NameDescribe
test_rht_init