Skip to content

Commit

Permalink
vmstat: fix dirty threshold ordering
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Michael Rubin <[email protected]>
Reviewed-by: KOSAKI Motohiro <[email protected]>
Reviewed-by: Minchan Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Wu Fengguang authored and torvalds committed Dec 2, 2010
1 parent 55cfaa3 commit e172662
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm/vmstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,6 @@ static const char * const vmstat_text[] = {
"nr_shmem",
"nr_dirtied",
"nr_written",
"nr_dirty_threshold",
"nr_dirty_background_threshold",

#ifdef CONFIG_NUMA
"numa_hit",
Expand All @@ -761,6 +759,8 @@ static const char * const vmstat_text[] = {
"numa_local",
"numa_other",
#endif
"nr_dirty_threshold",
"nr_dirty_background_threshold",

#ifdef CONFIG_VM_EVENT_COUNTERS
"pgpgin",
Expand Down

0 comments on commit e172662

Please sign in to comment.