Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Drains all per-CPU charge caches for given root_memcg resp. subtree* of the hierarchy under it.

Proto:static void drain_all_stock(struct mem_cgroup *root_memcg)

Type:void

Parameter:

TypeParameterName
struct mem_cgroup *root_memcg
2145  If Not mutex_trylock - try to acquire the mutex, without waiting*@lock: the mutex to be acquired* Try to acquire the mutex atomically Then Return
2153  curcpu = get_cpu()
2154  for_each_online_cpu(cpu)
2155  stock = per_cpu(memcg_stock, cpu)
2157  bool flush = false
2159  _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
2160  memcg = this never be root cgroup
2161  If memcg && nr_pages && mem_cgroup_is_descendant(memcg, root_memcg) Then flush = true
2164  _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()
2168  If cpu == curcpu Then drain_local_stock( & work)
2174  put_cpu()
2175  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
Caller
NameDescribe
try_charge
mem_cgroup_resize_max
mem_cgroup_force_emptyReclaims as many pages from the given memcg as possible.* Caller is responsible for holding css reference for memcg.
mem_cgroup_css_offline
memory_high_write
memory_max_write