kernel_optimize_test/drivers
Konstantin Khlebnikov 9d7ea9a297 mm/vmstat: add helpers to get vmstat item names for each enum type
Statistics in vmstat is combined from counters with different structure,
but names for them are merged into one array.

This patch adds trivial helpers to get name for each item:

  const char *zone_stat_name(enum zone_stat_item item);
  const char *numa_stat_name(enum numa_stat_item item);
  const char *node_stat_name(enum node_stat_item item);
  const char *writeback_stat_name(enum writeback_stat_item item);
  const char *vm_event_name(enum vm_event_item item);

Names for enum writeback_stat_item are folded in the middle of
vmstat_text so this patch moves declaration into header to calculate
offset of following items.

Also this patch reuses piece of node stat names for lru list names:

  const char *lru_list_name(enum lru_list lru);

This returns common lru list names: "inactive_anon", "active_anon",
"inactive_file", "active_file", "unevictable".

[khlebnikov@yandex-team.ru: do not use size of vmstat_text as count of /proc/vmstat items]
  Link: http://lkml.kernel.org/r/157152151769.4139.15423465513138349343.stgit@buzz
  Link: https://lore.kernel.org/linux-mm/cd1c42ae-281f-c8a8-70ac-1d01d417b2e1@infradead.org/T/#u
Link: http://lkml.kernel.org/r/157113012325.453.562783073839432766.stgit@buzz
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: YueHaibing <yuehaibing@huawei.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-12-04 19:44:11 -08:00
..
accessibility
acpi libnvdimm for 5.5 2019-12-01 18:43:25 -08:00
amba
android compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
ata pci-v5.5-changes 2019-12-03 13:58:22 -08:00
atm
auxdisplay
base mm/vmstat: add helpers to get vmstat item names for each enum type 2019-12-04 19:44:11 -08:00
bcma
block for-linus-20191129 2019-12-01 18:26:56 -08:00
bluetooth
bus
cdrom
char compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
clk This merge window we have one small clk provider API in the core framework and 2019-12-01 16:06:02 -08:00
clocksource Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-12-03 12:20:25 -08:00
connector
counter
cpufreq
cpuidle
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-12-02 17:23:21 -08:00
dax libnvdimm for 5.5 2019-12-01 18:43:25 -08:00
dca
devfreq
dio
dma
dma-buf compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
edac
eisa
extcon
firewire FireWire (IEEE 1394) subsystem updates: 2019-12-02 14:13:00 -08:00
firmware Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2019-12-03 09:27:29 -08:00
fpga
fsi
gnss
gpio This is the bulk of GPIO changes for the v5.5 kernel cycle 2019-12-01 17:56:50 -08:00
gpu pci-v5.5-changes 2019-12-03 13:58:22 -08:00
greybus
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2019-12-01 18:20:54 -08:00
hsi
hv Merge branch 'akpm' (patches from Andrew) 2019-12-01 20:36:41 -08:00
hwmon compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
hwspinlock
hwtracing compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
i2c Merge branch 'i2c/for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-12-01 18:29:36 -08:00
i3c
ide compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
idle
iio chrome platform changes for v5.5 2019-12-03 14:37:12 -08:00
infiniband compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
input chrome platform changes for v5.5 2019-12-03 14:37:12 -08:00
interconnect
iommu pci-v5.5-changes 2019-12-03 13:58:22 -08:00
ipack
irqchip pci-v5.5-changes 2019-12-03 13:58:22 -08:00
isdn compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
leds Merge tag 'leds-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds 2019-12-01 16:09:28 -08:00
lightnvm
macintosh powerpc updates for 5.5 2019-11-30 14:35:43 -08:00
mailbox mailbox changes for v5.5 2019-12-01 18:42:02 -08:00
mcb
md
media compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
memory
memstick pci-v5.5-changes 2019-12-03 13:58:22 -08:00
message
mfd chrome platform changes for v5.5 2019-12-03 14:37:12 -08:00
misc pci-v5.5-changes 2019-12-03 13:58:22 -08:00
mmc
mtd TTY/Serial patches for 5.5-rc1 2019-12-03 14:09:14 -08:00
mux
net TTY/Serial patches for 5.5-rc1 2019-12-03 14:09:14 -08:00
nfc
ntb
nubus
nvdimm libnvdimm for 5.5 2019-12-01 18:43:25 -08:00
nvme pci-v5.5-changes 2019-12-03 13:58:22 -08:00
nvmem
of Devicetree updates for v5.5: 2019-12-02 11:41:35 -08:00
opp
oprofile
parisc
parport
pci pci-v5.5-changes 2019-12-03 13:58:22 -08:00
pcmcia
perf
phy pci-v5.5-changes 2019-12-03 13:58:22 -08:00
pinctrl Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-12-03 09:29:50 -08:00
platform chrome platform changes for v5.5 2019-12-03 14:37:12 -08:00
pnp
power - Core Frameworks 2019-12-01 16:16:31 -08:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg rpmsg updates for v5.5 2019-12-01 18:39:24 -08:00
rtc RTC for 5.5 2019-12-03 13:31:08 -08:00
s390 s390 updates for the 5.5 merge window #2 2019-12-03 12:50:00 -08:00
sbus
scsi pci-v5.5-changes 2019-12-03 13:58:22 -08:00
sfi
sh
siox
slimbus
soc
soundwire
spi
spmi
ssb
staging pci-v5.5-changes 2019-12-03 13:58:22 -08:00
target SCSI misc on 20191130 2019-12-02 13:37:02 -08:00
tc
tee
thermal platform-drivers-x86 for v5.5-1 2019-12-01 18:24:25 -08:00
thunderbolt
tty TTY/Serial patches for 5.5-rc1 2019-12-03 14:09:14 -08:00
uio
usb pci-v5.5-changes 2019-12-03 13:58:22 -08:00
vfio pci-v5.5-changes 2019-12-03 13:58:22 -08:00
vhost compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
video pci-v5.5-changes 2019-12-03 13:58:22 -08:00
virt compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
virtio
visorbus
vlynq
vme
w1
watchdog linux-watchdog 5.5-rc1 tag 2019-12-01 18:01:03 -08:00
xen pci-v5.5-changes 2019-12-03 13:58:22 -08:00
zorro
Kconfig
Makefile