diff options
| author | Christoph Lameter <[email protected]> | 2008-04-28 02:12:40 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2008-04-28 08:58:21 -0700 |
| commit | a10aa579878fc6f9cd17455067380bbdf1d53c91 (patch) | |
| tree | c42fbb1e9422e5334c2207cafed4a2b5b1ad16c4 /include/linux | |
| parent | b45445684198a946b587732265692e6495993abf (diff) | |
vmalloc: show vmalloced areas via /proc/vmallocinfo
Implement a new proc file that allows the display of the currently allocated
vmalloc memory.
It allows to see the users of vmalloc. That is important if vmalloc space is
scarce (i386 for example).
And it's going to be important for the compound page fallback to vmalloc.
Many of the current users can be switched to use compound pages with fallback.
This means that the number of users of vmalloc is reduced and page tables no
longer necessary to access the memory. /proc/vmallocinfo allows to review how
that reduction occurs.
If memory becomes fragmented and larger order allocations are no longer
possible then /proc/vmallocinfo allows to see which compound page allocations
fell back to virtual compound pages. That is important for new users of
virtual compound pages. Such as order 1 stack allocation etc that may
fallback to virtual compound pages in the future.
/proc/vmallocinfo permissions are made readable-only-by-root to avoid possible
information leakage.
[[email protected]: coding-style fixes]
[[email protected]: CONFIG_MMU=n build fix]
Signed-off-by: Christoph Lameter <[email protected]>
Reviewed-by: KOSAKI Motohiro <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: Arjan van de Ven <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/vmalloc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index ce8e7da05807..7f3adfda337a 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h @@ -87,4 +87,6 @@ extern void free_vm_area(struct vm_struct *area); extern rwlock_t vmlist_lock; extern struct vm_struct *vmlist; +extern const struct seq_operations vmalloc_op; + #endif /* _LINUX_VMALLOC_H */ |