mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
mm: smaps: export mlock information
Currently there is no way to find whether a process has locked its pages in memory or not. And which of the memory regions are locked in memory. Add a new field "Locked" to export this information via the smaps file. Signed-off-by: Nikanth Karthikesan <[email protected]> Acked-by: Balbir Singh <[email protected]> Acked-by: Wu Fengguang <[email protected]> Cc: Matt Mackall <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
62c70bce8a
commit
2d90508f63
2 changed files with 8 additions and 2 deletions
|
|
@ -418,7 +418,8 @@ static int show_smap(struct seq_file *m, void *v)
|
|||
"Anonymous: %8lu kB\n"
|
||||
"Swap: %8lu kB\n"
|
||||
"KernelPageSize: %8lu kB\n"
|
||||
"MMUPageSize: %8lu kB\n",
|
||||
"MMUPageSize: %8lu kB\n"
|
||||
"Locked: %8lu kB\n",
|
||||
(vma->vm_end - vma->vm_start) >> 10,
|
||||
mss.resident >> 10,
|
||||
(unsigned long)(mss.pss >> (10 + PSS_SHIFT)),
|
||||
|
|
@ -430,7 +431,9 @@ static int show_smap(struct seq_file *m, void *v)
|
|||
mss.anonymous >> 10,
|
||||
mss.swap >> 10,
|
||||
vma_kernel_pagesize(vma) >> 10,
|
||||
vma_mmu_pagesize(vma) >> 10);
|
||||
vma_mmu_pagesize(vma) >> 10,
|
||||
(vma->vm_flags & VM_LOCKED) ?
|
||||
(unsigned long)(mss.pss >> (10 + PSS_SHIFT)) : 0);
|
||||
|
||||
if (m->count < m->size) /* vma is copied successfully */
|
||||
m->version = (vma != get_gate_vma(task)) ? vma->vm_start : 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue