Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto: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)

Type:unsigned int

Parameter:

TypeParameterName
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  If pf_lru_node helpers Then
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  Else if del_from_htab(del_arg, node) Then
221  __bpf_lru_node_move_to_free(l, node, free_list, tgt_free_type)
223  If ++nshrinked == tgt_nshrink Then Break
227  If ++i == nr_scans Then Break
231  Return nshrinked
Caller
NameDescribe
__bpf_lru_list_shrinkCalls __bpf_lru_list_shrink_inactive() to shrink some* ref-bit-cleared nodes and move them to the designated* free list