Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vmstat: fix dirty threshold ordering

The nr_dirty_[background_]threshold fields are misplaced before the
numa_* fields, and users will read strange values.

This is the right order. Before patch, nr_dirty_background_threshold
will read as 0 (the value from numa_miss).

numa_hit 128501
numa_miss 0
numa_foreign 0
numa_interleave 7388
numa_local 128501
numa_other 0
nr_dirty_threshold 144291
nr_dirty_background_threshold 72145

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Michael Rubin <mrubin@google.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Wu Fengguang and committed by
Linus Torvalds
e172662d 55cfaa3c

+2 -2
+2 -2
mm/vmstat.c
··· 750 750 "nr_shmem", 751 751 "nr_dirtied", 752 752 "nr_written", 753 - "nr_dirty_threshold", 754 - "nr_dirty_background_threshold", 755 753 756 754 #ifdef CONFIG_NUMA 757 755 "numa_hit", ··· 759 761 "numa_local", 760 762 "numa_other", 761 763 #endif 764 + "nr_dirty_threshold", 765 + "nr_dirty_background_threshold", 762 766 763 767 #ifdef CONFIG_VM_EVENT_COUNTERS 764 768 "pgpgin",