Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mem_cgroup_swap_full

Proto:bool mem_cgroup_swap_full(struct page *page)

Type:bool

Parameter:

TypeParameterName
struct page *page
7015  VM_BUG_ON_PAGE(!PageLocked(page), page)
7017  If vm_swap_full() Then Return true
7019  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 false
7022  memcg = mem_cgroup
7023  If Not memcg Then Return false
7026  When memcg != root_mem_cgroup cycle If page_counter_read( & swap) * 2 >= max Then
7028  Return true
7030  Return false
Caller
NameDescribe
do_swap_pageWe enter with non-exclusive mmap_sem (to exclude vma changes,* but allow concurrent faults), and pte mapped but not yet locked.* We return with pte unmapped and unlocked.* We return with the mmap_sem locked or unlocked in the same cases
__try_to_reclaim_swaprns 1 if swap entry is freed