函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mem_cgroup_charge_skmem - charge socket memory*@memcg: memcg to charge*@nr_pages: number of pages to charge* Charges @nr_pages to @memcg. Returns %true if the charge fit within*@memcg's configured limit, %false if the charge had to be forced.

函数原型:bool mem_cgroup_charge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages)

返回类型:bool

参数:

类型参数名称
struct mem_cgroup *memcg
unsigned intnr_pages
6728  gfp_mask等于GFP_KERNEL
6730  如果非cgroup_subsys_on_dfl - fast test on whether a subsys is on default hierarchy*@ss: subsystem in question(memory_cgrp_subsys)则
6734  tcpmem_pressure等于0
6735  返回:true
6737  page_counter_charge - hierarchically charge pages*@counter: counter*@nr_pages: number of pages to charge* NOTE: This does not consider any configured counter limits.
6738  tcpmem_pressure等于1
6739  返回:false
6743  如果in_softirq()则gfp_mask等于GFP_NOWAIT
6746  dx can be of type enum memcg_stat_item or node_stat_item
6748  如果try_charge(memcg, gfp_mask, nr_pages)恒等于0则返回:true
6751  try_charge(memcg, gfp_mask | __GFP_NOFAIL, nr_pages)
6752  返回:false