Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mem_cgroup_sk_alloc

Proto:void mem_cgroup_sk_alloc(struct sock *sk)

Type:void

Parameter:

TypeParameterName
struct sock *sk
6683  If Not mem_cgroup_sockets_enabled Then Return
6695  If sk_memcg Then
6696  ss_get - obtain a reference on the specified css*@css: target css* The caller must already have a reference.
6697  Return
6700  _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
6701  memcg = mem_cgroup_from_task(current process)
6702  If memcg == root_mem_cgroup Then Go to out
6704  If Not cgroup_subsys_on_dfl - fast test on whether a subsys is on default hierarchy*@ss: subsystem in question(memory_cgrp_subsys) && Not Legacy tcp memory accounting Then Go to out
6706  If ss_tryget_online - try to obtain a reference on the specified css if online*@css: target css* Obtain a reference on @css if it's online Then sk_memcg = memcg
6708  out :
6709  _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()