Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memcontrol.c Create Date:2022-07-28 16:14:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:bool mem_cgroup_charge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages)

Type:bool

Parameter:

TypeParameterName
struct mem_cgroup *memcg
unsigned intnr_pages
6728  gfp_mask = GFP_KERNEL
6730  If Not cgroup_subsys_on_dfl - fast test on whether a subsys is on default hierarchy*@ss: subsystem in question(memory_cgrp_subsys) Then
6734  tcpmem_pressure = 0
6735  Return 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  Return false
6743  If in_softirq() Then gfp_mask = GFP_NOWAIT
6746  dx can be of type enum memcg_stat_item or node_stat_item
6748  If try_charge(memcg, gfp_mask, nr_pages) == 0 Then Return true
6751  try_charge(memcg, gfp_mask | __GFP_NOFAIL, nr_pages)
6752  Return false