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:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Calls __bpf_lru_list_shrink_inactive() to shrink some* ref-bit-cleared nodes and move them to the designated* free list

Proto:static unsigned int __bpf_lru_list_shrink(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
266  nshrinked = 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.
268  If nshrinked Then Return nshrinked
272  If Not list_empty - tests whether a list is empty*@head: the list to test. Then force_shrink_list = lists[BPF_LRU_LIST_T_INACTIVE]
274  Else force_shrink_list = lists[BPF_LRU_LIST_T_ACTIVE]
279  If del_from_htab(del_arg, node) Then
280  __bpf_lru_node_move_to_free(l, node, free_list, tgt_free_type)
282  Return 1
286  Return 0
Caller
NameDescribe
bpf_lru_list_pop_free_to_local
bpf_percpu_lru_pop_free