Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164383
b: refs/heads/master
c: 4b02108
h: refs/heads/master
i:
  164381: ac469a0
  164379: 6fa23f2
  164375: a8d14d9
  164367: 9a3da1d
  164351: 32bac53
v: v3
  • Loading branch information
KOSAKI Motohiro authored and Linus Torvalds committed Sep 22, 2009
1 parent 0d84ad3 commit b364ffd
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c6a7f5728a1db45d30df55a01adc130b4ab0327c
refs/heads/master: 4b02108ac1b3354a22b0d83c684797692efdc395
2 changes: 2 additions & 0 deletions trunk/drivers/base/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ static ssize_t node_read_meminfo(struct sys_device * dev,
"Node %d FilePages: %8lu kB\n"
"Node %d Mapped: %8lu kB\n"
"Node %d AnonPages: %8lu kB\n"
"Node %d Shmem: %8lu kB\n"
"Node %d KernelStack: %8lu kB\n"
"Node %d PageTables: %8lu kB\n"
"Node %d NFS_Unstable: %8lu kB\n"
Expand Down Expand Up @@ -117,6 +118,7 @@ static ssize_t node_read_meminfo(struct sys_device * dev,
nid, K(node_page_state(nid, NR_FILE_PAGES)),
nid, K(node_page_state(nid, NR_FILE_MAPPED)),
nid, K(node_page_state(nid, NR_ANON_PAGES)),
nid, K(node_page_state(nid, NR_SHMEM)),
nid, node_page_state(nid, NR_KERNEL_STACK) *
THREAD_SIZE / 1024,
nid, K(node_page_state(nid, NR_PAGETABLE)),
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/proc/meminfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
"Writeback: %8lu kB\n"
"AnonPages: %8lu kB\n"
"Mapped: %8lu kB\n"
"Shmem: %8lu kB\n"
"Slab: %8lu kB\n"
"SReclaimable: %8lu kB\n"
"SUnreclaim: %8lu kB\n"
Expand Down Expand Up @@ -125,6 +126,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
K(global_page_state(NR_WRITEBACK)),
K(global_page_state(NR_ANON_PAGES)),
K(global_page_state(NR_FILE_MAPPED)),
K(global_page_state(NR_SHMEM)),
K(global_page_state(NR_SLAB_RECLAIMABLE) +
global_page_state(NR_SLAB_UNRECLAIMABLE)),
K(global_page_state(NR_SLAB_RECLAIMABLE)),
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ enum zone_stat_item {
NR_BOUNCE,
NR_VMSCAN_WRITE,
NR_WRITEBACK_TEMP, /* Writeback using temporary buffers */
NR_SHMEM, /* shmem pages (included tmpfs/GEM pages) */
#ifdef CONFIG_NUMA
NUMA_HIT, /* allocated in intended node */
NUMA_MISS, /* allocated in non intended node */
Expand Down
4 changes: 4 additions & 0 deletions trunk/mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ void __remove_from_page_cache(struct page *page)
page->mapping = NULL;
mapping->nrpages--;
__dec_zone_page_state(page, NR_FILE_PAGES);
if (PageSwapBacked(page))
__dec_zone_page_state(page, NR_SHMEM);
BUG_ON(page_mapped(page));

/*
Expand Down Expand Up @@ -431,6 +433,8 @@ int add_to_page_cache_locked(struct page *page, struct address_space *mapping,
if (likely(!error)) {
mapping->nrpages++;
__inc_zone_page_state(page, NR_FILE_PAGES);
if (PageSwapBacked(page))
__inc_zone_page_state(page, NR_SHMEM);
spin_unlock_irq(&mapping->tree_lock);
} else {
page->mapping = NULL;
Expand Down
5 changes: 4 additions & 1 deletion trunk/mm/migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,10 @@ static int migrate_page_move_mapping(struct address_space *mapping,
*/
__dec_zone_page_state(page, NR_FILE_PAGES);
__inc_zone_page_state(newpage, NR_FILE_PAGES);

if (PageSwapBacked(page)) {
__dec_zone_page_state(page, NR_SHMEM);
__inc_zone_page_state(newpage, NR_SHMEM);
}
spin_unlock_irq(&mapping->tree_lock);

return 0;
Expand Down
5 changes: 4 additions & 1 deletion trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2139,7 +2139,7 @@ void show_free_areas(void)
" unevictable:%lu"
" dirty:%lu writeback:%lu unstable:%lu buffer:%lu\n"
" free:%lu slab_reclaimable:%lu slab_unreclaimable:%lu\n"
" mapped:%lu pagetables:%lu bounce:%lu\n",
" mapped:%lu shmem:%lu pagetables:%lu bounce:%lu\n",
global_page_state(NR_ACTIVE_ANON),
global_page_state(NR_ACTIVE_FILE),
global_page_state(NR_INACTIVE_ANON),
Expand All @@ -2153,6 +2153,7 @@ void show_free_areas(void)
global_page_state(NR_SLAB_RECLAIMABLE),
global_page_state(NR_SLAB_UNRECLAIMABLE),
global_page_state(NR_FILE_MAPPED),
global_page_state(NR_SHMEM),
global_page_state(NR_PAGETABLE),
global_page_state(NR_BOUNCE));

Expand All @@ -2175,6 +2176,7 @@ void show_free_areas(void)
" dirty:%lukB"
" writeback:%lukB"
" mapped:%lukB"
" shmem:%lukB"
" slab_reclaimable:%lukB"
" slab_unreclaimable:%lukB"
" kernel_stack:%lukB"
Expand All @@ -2200,6 +2202,7 @@ void show_free_areas(void)
K(zone_page_state(zone, NR_FILE_DIRTY)),
K(zone_page_state(zone, NR_WRITEBACK)),
K(zone_page_state(zone, NR_FILE_MAPPED)),
K(zone_page_state(zone, NR_SHMEM)),
K(zone_page_state(zone, NR_SLAB_RECLAIMABLE)),
K(zone_page_state(zone, NR_SLAB_UNRECLAIMABLE)),
zone_page_state(zone, NR_KERNEL_STACK) *
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/vmstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ static const char * const vmstat_text[] = {
"nr_bounce",
"nr_vmscan_write",
"nr_writeback_temp",

"nr_shmem",
#ifdef CONFIG_NUMA
"numa_hit",
"numa_miss",
Expand Down

0 comments on commit b364ffd

Please sign in to comment.