Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sbitmap_queue_init_node

Proto:int sbitmap_queue_init_node(struct sbitmap_queue *sbq, unsigned int depth, int shift, bool round_robin, gfp_t flags, int node)

Type:int

Parameter:

TypeParameterName
struct sbitmap_queue *sbq
unsigned intdepth
intshift
boolround_robin
gfp_tflags
intnode
358  ret = sbitmap_init_node( & @sb: Scalable bitmap., depth, shift, flags, node)
359  If ret Then Return ret
362  @alloc_hint: Cache of last successfully allocated or freed bit.* This is per-cpu, which allows multiple users to stick to different* cachelines until the map is exhausted. = alloc_percpu_gfp(unsignedint, flags)
363  If Not @alloc_hint: Cache of last successfully allocated or freed bit.* This is per-cpu, which allows multiple users to stick to different* cachelines until the map is exhausted. Then
364  sbitmap_free() - Free memory used by a &struct sbitmap.*@sb: Bitmap to free.
365  Return -ENOMEM
368  If depth && Not round_robin Then
369  for_each_possible_cpu(i)
370  per_cpu_ptr(@alloc_hint: Cache of last successfully allocated or freed bit.* This is per-cpu, which allows multiple users to stick to different* cachelines until the map is exhausted., i) = prandom_u32() % depth
373  @min_shallow_depth: The minimum shallow depth which may be passed to* sbitmap_queue_get_shallow() or __sbitmap_queue_get_shallow(). = UINT_MAX
374  @wake_batch: Number of bits which must be freed before we wake up any* waiters. = sbq_calc_wake_batch(sbq, depth)
375  atomic_set( & @wake_index: Next wait queue in @ws to wake up., 0)
376  atomic_set( & @ws_active: count of currently active ws waitqueues, 0)
378  @ws: Wait queues. = kzalloc_node - allocate zeroed memory from a particular memory node.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).*@node: memory node from which to allocate
379  If Not @ws: Wait queues. Then
380  free previously allocated percpu memory
381  sbitmap_free() - Free memory used by a &struct sbitmap.*@sb: Bitmap to free.
382  Return -ENOMEM
385  When i < SBQ_WAIT_QUEUES cycle
386  init_waitqueue_head( & @wait: Wait queue.)
387  atomic_set( & @wait_cnt: Number of frees remaining before we wake up., @wake_batch: Number of bits which must be freed before we wake up any* waiters.)
390  @round_robin: Allocate bits in strict round-robin order. = round_robin
391  Return 0
Caller
NameDescribe
kyber_queue_data_alloc