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

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

Proto:static void __bpf_lru_node_move(struct bpf_lru_list *l, struct bpf_lru_node *node, enum bpf_lru_list_type tgt_type)

Type:void

Parameter:

TypeParameterName
struct bpf_lru_list *l
struct bpf_lru_node *node
enum bpf_lru_list_typetgt_type
104  If WARN_ON_ONCE(IS_LOCAL_LIST_TYPE(type)) || WARN_ON_ONCE(IS_LOCAL_LIST_TYPE(tgt_type)) Then Return
108  If type != tgt_type Then
109  bpf_lru_list_count_dec(l, type)
110  bpf_lru_list_count_inc(l, tgt_type)
111  type = tgt_type
113  ref = 0
118  If list == The next inacitve list rotation starts from here Then The next inacitve list rotation starts from here = prev
121  list_move - delete from one list and add as another's head*@list: the entry to move*@head: the head that will precede our entry
Caller
NameDescribe
__bpf_lru_list_rotate_activeRotate the active list:* 1. Start from tail* 2. If the node has the ref bit set, it will be rotated* back to the head of active list with the ref bit cleared.* Give this node one more chance to survive in the active list.* 3
__bpf_lru_list_rotate_inactiveRotate the inactive list. It starts from the next_inactive_rotation* 1. If the node has ref bit set, it will be moved to the head* of active list with the ref bit cleared.* 2. If the node does not have ref bit set, it will leave it
__bpf_lru_list_shrink_inactiveShrink 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.
bpf_lru_list_push_free
bpf_percpu_lru_pop_free
bpf_percpu_lru_push_free