Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:memcg_numa_stat_show

Proto:static int memcg_numa_stat_show(struct seq_file *m, void *v)

Type:int

Parameter:

TypeParameterName
struct seq_file *m
void *v
3649  struct numa_stat{const char * name;unsigned int lru_mask;}
3654  static const struct numa_stat stats[] = {{"total", LRU_ALL}, {"file", LRU_ALL_FILE}, {"anon", LRU_ALL_ANON}, {"unevictable", BIT(LRU_UNEVICTABLE)}, }
3663  memcg = mem_cgroup_from_seq(m)
3665  When stat < stats + ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(stats) cycle
3666  nr = mem_cgroup_nr_lru_pages(memcg, lru_mask)
3667  seq_printf(m, "%s=%lu", name, nr)
3671  seq_printf(m, " N%d=%lu", nid, nr)
3673  seq_putc(m, '\n')
3676  When stat < stats + ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(stats) cycle
3679  nr = 0
3680  Iteration constructs for visiting all cgroups (under a tree). If* loops are exited prematurely (break), mem_cgroup_iter_break() must* be used for reference counting.(iter, memcg)
3681  nr += mem_cgroup_nr_lru_pages(iter, lru_mask)
3682  seq_printf(m, "hierarchical_%s=%lu", name, nr)
3684  nr = 0
3688  seq_printf(m, " N%d=%lu", nid, nr)
3690  seq_putc(m, '\n')
3693  Return 0