Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:pcpu_freelist_populate

Proto:void pcpu_freelist_populate(struct pcpu_freelist *s, void *buf, u32 elem_size, u32 nr_elems)

Type:void

Parameter:

TypeParameterName
struct pcpu_freelist *s
void *buf
u32elem_size
u32nr_elems
62  pcpu_entries = nr_elems / num_possible_cpus() + 1
63  i = 0
69  local_irq_save(flags)
70  for_each_possible_cpu(cpu)
71  again :
72  head = per_cpu_ptr(freelist, cpu)
73  ___pcpu_freelist_push(head, buf)
74  i++
75  buf += elem_size
76  If i == nr_elems Then Break
78  If i % pcpu_entries Then Go to again
81  local_irq_restore(flags)
Caller
NameDescribe
prealloc_elems_and_freelist