Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mem_cgroup_get_oom_group - get a memory cgroup to clean up after OOM*@victim: task to be killed by the OOM killer*@oom_domain: memcg in case of memcg OOM, NULL in case of system-wide OOM* Returns a pointer to a memory cgroup, which has to be cleaned up

Proto:struct mem_cgroup *mem_cgroup_get_oom_group(struct task_struct *victim, struct mem_cgroup *oom_domain)

Type:struct mem_cgroup

Parameter:

TypeParameterName
struct task_struct *victim
struct mem_cgroup *oom_domain
1904  struct mem_cgroup * oom_group = NULL
1907  If Not cgroup_subsys_on_dfl - fast test on whether a subsys is on default hierarchy*@ss: subsystem in question(memory_cgrp_subsys) Then Return NULL
1910  If Not oom_domain Then oom_domain = root_mem_cgroup
1913  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1915  memcg = mem_cgroup_from_task(victim)
1916  If memcg == root_mem_cgroup Then Go to out
1924  When memcg cycle
1925  If * Should the OOM killer kill all belonging tasks, had it kill one? Then oom_group = memcg
1928  If memcg == oom_domain Then Break
1932  If oom_group Then ss_get - obtain a reference on the specified css*@css: target css* The caller must already have a reference.
1934  out :
1935  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1937  Return oom_group