Skip to contentSkip to conversation

Fix print order in show_free_areas()

PATCH Applied Alexander Polakov 3 participants 3 messages Mar 24, 2017 – Apr 4, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix print order in show_free_areas()

Better seen in context: https://github.com/torvalds/linux/blob/master/m
m/page_alloc.c#L4500

mm/page_alloc.c +0 -0
index 8afb60c..7b528c7 100644
@@ -4398,13 +4398,13 @@ void show_free_areas(unsigned int filter)

A K(node_page_state(pgdat, NR_FILE_MAPPED)),
A K(node_page_state(pgdat, NR_FILE_DIRTY)),
A K(node_page_state(pgdat, NR_WRITEBACK)),
+ K(node_page_state(pgdat, NR_SHMEM)),
A #ifdef CONFIG_TRANSPARENT_HUGEPAGE
A K(node_page_state(pgdat, NR_SHMEM_THPS) *
HPAGE_PMD_NR),
A K(node_page_state(pgdat, NR_SHMEM_PMDMAPPED)
A * HPAGE_PMD_NR),
A K(node_page_state(pgdat, NR_ANON_THPS) *
HPAGE_PMD_NR),
A #endif
- K(node_page_state(pgdat, NR_SHMEM)),
A K(node_page_state(pgdat, NR_WRITEBACK_TEMP)),
A K(node_page_state(pgdat, NR_UNSTABLE_NFS)),
A node_page_state(pgdat, NR_PAGES_SCANNED),

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

maintainer
#1 lore raw
Quoted 4 lines · On Fri, 24 Mar 2017 20:48:50 +0300 Alexander Polakov <[email protected]> wrote:

Better seen in context: https://github.com/torvalds/linux/blob/master/m
m/page_alloc.c#L4500

mm/page_alloc.c renamed from mm/page_alloc.c~fix-print-order-in-show_free_areas +1 -1
@@ -4519,13 +4519,13 @@ void show_free_areas(unsigned int filter
 			K(node_page_state(pgdat, NR_FILE_MAPPED)),
 			K(node_page_state(pgdat, NR_FILE_DIRTY)),
 			K(node_page_state(pgdat, NR_WRITEBACK)),
+			K(node_page_state(pgdat, NR_SHMEM)),
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
 			K(node_page_state(pgdat, NR_SHMEM_THPS) * HPAGE_PMD_NR),
 			K(node_page_state(pgdat, NR_SHMEM_PMDMAPPED)
 					* HPAGE_PMD_NR),
 			K(node_page_state(pgdat, NR_ANON_THPS) * HPAGE_PMD_NR),
 #endif
-			K(node_page_state(pgdat, NR_SHMEM)),
 			K(node_page_state(pgdat, NR_WRITEBACK_TEMP)),
 			K(node_page_state(pgdat, NR_UNSTABLE_NFS)),
 			node_page_state(pgdat, NR_PAGES_SCANNED),

_

huh. It looks like this has been broken for nearly a year, by

: commit 11fb998986a72aa7e997d96d63d52582a01228c5
: Author: Mel Gorman <[email protected]>
: AuthorDate: Thu Jul 28 15:46:20 2016 -0700
: Commit: Linus Torvalds <[email protected]>
: CommitDate: Thu Jul 28 16:07:41 2016 -0700
:
: mm: move most file-based accounting to the node

I'm surprised nobody noticed until now.

btw, your email client is messing up the patches: tabs are getting mangled and wordwrapping is added. Please fix that up for next time.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#2 lore raw
Quoted 28 lines · Andrew Morton
Quoted 4 lines · On Fri, 24 Mar 2017 20:48:50 +0300 Alexander Polakov <[email protected]> wrote:

Better seen in context: https://github.com/torvalds/linux/blob/master/m
m/page_alloc.c#L4500

mm/page_alloc.c renamed from mm/page_alloc.c~fix-print-order-in-show_free_areas +1 -1
@@ -4519,13 +4519,13 @@ void show_free_areas(unsigned int filter
 			K(node_page_state(pgdat, NR_FILE_MAPPED)),
 			K(node_page_state(pgdat, NR_FILE_DIRTY)),
 			K(node_page_state(pgdat, NR_WRITEBACK)),
+			K(node_page_state(pgdat, NR_SHMEM)),
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
 			K(node_page_state(pgdat, NR_SHMEM_THPS) * HPAGE_PMD_NR),
 			K(node_page_state(pgdat, NR_SHMEM_PMDMAPPED)
 					* HPAGE_PMD_NR),
 			K(node_page_state(pgdat, NR_ANON_THPS) * HPAGE_PMD_NR),
 #endif
-			K(node_page_state(pgdat, NR_SHMEM)),
 			K(node_page_state(pgdat, NR_WRITEBACK_TEMP)),
 			K(node_page_state(pgdat, NR_UNSTABLE_NFS)),
 			node_page_state(pgdat, NR_PAGES_SCANNED),

_

huh. It looks like this has been broken for nearly a year, by

Quoted 8 lines

: commit 11fb998986a72aa7e997d96d63d52582a01228c5
: Author: Mel Gorman <[email protected]>
: AuthorDate: Thu Jul 28 15:46:20 2016 -0700
: Commit: Linus Torvalds <[email protected]>
: CommitDate: Thu Jul 28 16:07:41 2016 -0700
:
: mm: move most file-based accounting to the node

Yes, this was careless. Thanks for catching it Alexander.

Quoted 2 lines

I'm surprised nobody noticed until now.

Probably because vmstat was not affected which is consumed more often than the output from sysrq or an oom kill message.

Signature · 8 lines
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>