函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:pcpu_freelist_populate

函数原型:void pcpu_freelist_populate(struct pcpu_freelist *s, void *buf, u32 elem_size, u32 nr_elems)

返回类型:void

参数:

类型参数名称
struct pcpu_freelist *s
void *buf
u32elem_size
u32nr_elems
62  pcpu_entries等于nr_elemsnum_possible_cpus()加1
63  i等于0
69  local_irq_save(flags)
70  遍历可用CPU(cpu)
71  again :
72  head等于per_cpu_ptr(freelist, cpu)
73  ___pcpu_freelist_push(head, buf)
74  i自加
75  buf加等于elem_size
76  如果i恒等于nr_elems退出
78  如果i取模pcpu_entries则转到:again
81  local_irq_restore(flags)
调用者
名称描述
prealloc_elems_and_freelist
prealloc_init