aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/filesystems/proc.txt3
-rw-r--r--fs/proc/task_mmu.c7
2 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 9471225212c4..ef757fca470b 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -375,6 +375,7 @@ Anonymous: 0 kB
375Swap: 0 kB 375Swap: 0 kB
376KernelPageSize: 4 kB 376KernelPageSize: 4 kB
377MMUPageSize: 4 kB 377MMUPageSize: 4 kB
378Locked: 374 kB
378 379
379The first of these lines shows the same information as is displayed for the 380The first of these lines shows the same information as is displayed for the
380mapping in /proc/PID/maps. The remaining lines show the size of the mapping 381mapping in /proc/PID/maps. The remaining lines show the size of the mapping
@@ -670,6 +671,8 @@ varies by architecture and compile options. The following is from a
670 671
671> cat /proc/meminfo 672> cat /proc/meminfo
672 673
674The "Locked" indicates whether the mapping is locked in memory or not.
675
673 676
674MemTotal: 16344972 kB 677MemTotal: 16344972 kB
675MemFree: 13634064 kB 678MemFree: 13634064 kB
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index c3755bd8dd3e..60b914860f81 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -418,7 +418,8 @@ static int show_smap(struct seq_file *m, void *v)
418 "Anonymous: %8lu kB\n" 418 "Anonymous: %8lu kB\n"
419 "Swap: %8lu kB\n" 419 "Swap: %8lu kB\n"
420 "KernelPageSize: %8lu kB\n" 420 "KernelPageSize: %8lu kB\n"
421 "MMUPageSize: %8lu kB\n", 421 "MMUPageSize: %8lu kB\n"
422 "Locked: %8lu kB\n",
422 (vma->vm_end - vma->vm_start) >> 10, 423 (vma->vm_end - vma->vm_start) >> 10,
423 mss.resident >> 10, 424 mss.resident >> 10,
424 (unsigned long)(mss.pss >> (10 + PSS_SHIFT)), 425 (unsigned long)(mss.pss >> (10 + PSS_SHIFT)),
@@ -430,7 +431,9 @@ static int show_smap(struct seq_file *m, void *v)
430 mss.anonymous >> 10, 431 mss.anonymous >> 10,
431 mss.swap >> 10, 432 mss.swap >> 10,
432 vma_kernel_pagesize(vma) >> 10, 433 vma_kernel_pagesize(vma) >> 10,
433 vma_mmu_pagesize(vma) >> 10); 434 vma_mmu_pagesize(vma) >> 10,
435 (vma->vm_flags & VM_LOCKED) ?
436 (unsigned long)(mss.pss >> (10 + PSS_SHIFT)) : 0);
434 437
435 if (m->count < m->size) /* vma is copied successfully */ 438 if (m->count < m->size) /* vma is copied successfully */
436 m->version = (vma != get_gate_vma(task)) ? vma->vm_start : 0; 439 m->version = (vma != get_gate_vma(task)) ? vma->vm_start : 0;