diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-09-15 08:50:29 -0700 |
|---|---|---|
| committer | Christoph Hellwig <hch@hera.kernel.org> | 2002-09-15 08:50:29 -0700 |
| commit | c9d3808fc28fc873dcf0dc95315f644997fde1d0 (patch) | |
| tree | 99ab611d63067a4f611485945577456429f40100 /fs/proc/array.c | |
| parent | fca174ccac67746acd88af0ce8f9f4178ea303b2 (diff) | |
[PATCH] hugetlb pages
Rohit Seth's ia32 huge tlb pages patch.
Anton Blanchard took a look at this today; he seemed happy
with it and said he could borrow bits.
Diffstat (limited to 'fs/proc/array.c')
| -rw-r--r-- | fs/proc/array.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 0084e27fe7a8..feb2cbab4699 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -487,7 +487,18 @@ int proc_pid_statm(struct task_struct *task, char * buffer) while (vma) { pgd_t *pgd = pgd_offset(mm, vma->vm_start); int pages = 0, shared = 0, dirty = 0, total = 0; - + if (is_vm_hugetlb_page(vma)) { + int num_pages = ((vma->vm_end - vma->vm_start)/PAGE_SIZE); + + resident += num_pages; + if (!(vma->vm_flags & VM_DONTCOPY)) + share += num_pages; + if (vma->vm_flags & VM_WRITE) + dt += num_pages; + drs += num_pages; + vma = vma->vm_next; + continue; + } statm_pgd_range(pgd, vma->vm_start, vma->vm_end, &pages, &shared, &dirty, &total); resident += pages; share += shared; |
