函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Shrink the inactive list. It starts from the tail of the* inactive list and only move the nodes without the ref bit* set to the designated free list.

函数原型:static unsigned int __bpf_lru_list_shrink_inactive(struct bpf_lru *lru, struct bpf_lru_list *l, unsigned int tgt_nshrink, struct list_head *free_list, enum bpf_lru_list_type tgt_free_type)

返回类型:unsigned int

参数:

类型参数名称
struct bpf_lru *lru
struct bpf_lru_list *l
unsigned inttgt_nshrink
struct list_head *free_list
enum bpf_lru_list_typetgt_free_type
212  inactive等于lists[BPF_LRU_LIST_T_INACTIVE]
214  nshrinked等于0
215  i等于0
218  如果pf_lru_node helpers
219  Move nodes between or within active and inactive list (like* active to inactive, inactive to active or tail of active back to* the head of active).
220  否则如果del_from_htab(del_arg, node)则
221  __bpf_lru_node_move_to_free(l, node, free_list, tgt_free_type)
223  如果nshrinked先自加恒等于tgt_nshrink退出
227  如果i先自加恒等于nr_scans退出
231  返回:nshrinked
调用者
名称描述
__bpf_lru_list_shrinkCalls __bpf_lru_list_shrink_inactive() to shrink some* ref-bit-cleared nodes and move them to the designated* free list