> Per-memcg state are things that represent the current state of the > system (e.g. NR_SWAPCACHE). This can naturally go up or down. > > It seems like the code here follows the same semantics, and this > change breaks that. Also, now these stats depend on > CONFIG_VM_EVENT_COUNTERS . Yes, nr_memmap_* won't show up without this config with my change. > > Looking at NR_VMSTAT_ITEMS, it looks like it's composed of: > NR_VM_ZONE_STAT_ITEMS, > NR_VM_NUMA_EVENT_ITEMS, > NR_VM_NODE_STAT_ITEMS, > NR_VM_WRITEBACK_STAT_ITEMS, > NR_VM_EVENT_ITEMS (with CONFIG_VM_EVENT_COUNTERS) > Semantically, the memmap stats do not fit into any of the above > categories if we do not want them to be per-node. Maybe they should > have their own category like NR_VM_WRITEBACK_STAT_ITEMS, or maybe we > should consolidate both of them into a global stat items category > (e.g. NR_VM_STAT_ITEMS)? I like the idea of renaming NR_VM_WRITEBACK_STAT_ITEMS with NR_GLOBAL_STAT_ITEMS, and add counters there, let me do that. Pasha