函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__count_memcg_events - account VM events in a cgroup*@memcg: the memory cgroup*@idx: the event item*@count: the number of events that occured

函数原型:void __count_memcg_events(struct mem_cgroup *memcg, enum vm_event_item idx, unsigned long count)

返回类型:void

参数:

类型参数名称
struct mem_cgroup *memcg
enum vm_event_itemidx
unsigned longcount
791  如果mem_cgroup_disabled()则返回
794  x等于countOperations for contexts that are safe from preemption/interrupts. These* operations verify that preemption is disabled.(events[idx])
795  如果此条件成立可能性小(为编译器优化)(x > size of first charge trial. "32" comes from vmscan.c's magic value.* TODO: maybe necessary to use big numbers in big irons.)则
802  __this_cpu_add(events[idx], x)
803 mi循环atomic_long_add(x, & vmevents[idx])
805  x等于0
807  __this_cpu_write(events[idx], x)
调用者
名称描述
shrink_inactive_listshrink_inactive_list() is a helper for shrink_node(). It returns the number* of reclaimed pages
shrink_active_list
mem_cgroup_charge_statistics
uncharge_batch
count_memcg_events