函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:bpf_common_lru_pop_free

函数原型:static struct bpf_lru_node *bpf_common_lru_pop_free(struct bpf_lru *lru, u32 hash)

返回类型:struct bpf_lru_node

参数:

类型参数名称
struct bpf_lru *lru
u32hash
435  clru等于common_lru
439  cpu等于These macros fold the SMP functionality into a single CPU system()
441  loc_l等于per_cpu_ptr(local_list, cpu)
443  raw_spin_lock_irqsave( & lock, flags)
445  node等于__local_list_pop_free(loc_l)
446  如果非node
447  bpf_lru_list_pop_free_to_local(lru, loc_l)
448  node等于__local_list_pop_free(loc_l)
451  如果node__local_list_add_pending(lru, loc_l, cpu, node, hash)
454  raw_spin_unlock_irqrestore( & lock, flags)
456  如果node则返回:node
467  first_steal等于next_steal
468  steal等于first_steal
469  循环
470  steal_loc_l等于per_cpu_ptr(local_list, steal)
472  raw_spin_lock_irqsave( & lock, flags)
474  node等于__local_list_pop_free(steal_loc_l)
475  如果非nodenode等于__local_list_pop_pending(lru, steal_loc_l)
478  raw_spin_unlock_irqrestore( & lock, flags)
480  steal等于get_next_cpu(steal)
481  当非nodesteal不等于first_steal循环
483  next_steal等于steal
485  如果node
486  raw_spin_lock_irqsave( & lock, flags)
487  __local_list_add_pending(lru, loc_l, cpu, node, hash)
488  raw_spin_unlock_irqrestore( & lock, flags)
491  返回:node
调用者
名称描述
bpf_lru_pop_free