Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mem_cgroup_get_nr_swap_pages

Proto:long mem_cgroup_get_nr_swap_pages(struct mem_cgroup *memcg)

Type:long

Parameter:

TypeParameterName
struct mem_cgroup *memcg
7000  nr_swap_pages = get_nr_swap_pages()
7002  If Not Whether the swap controller is active || Not cgroup_subsys_on_dfl - fast test on whether a subsys is on default hierarchy*@ss: subsystem in question(memory_cgrp_subsys) Then Return nr_swap_pages
7004  When memcg != root_mem_cgroup cycle nr_swap_pages = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(long, nr_swap_pages, READ_ONCE(max) - page_counter_read( & swap))
7008  Return nr_swap_pages