diff options
author | Hugh Dickins <hugh@veritas.com> | 2005-05-17 00:53:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-17 10:59:10 -0400 |
commit | 64d13c00cf1f7c3d2c1ff449e2a0500ab568d319 (patch) | |
tree | 864ac985be04cc9434ffc63a7357043c2b46b8a6 | |
parent | baae956100334ffbd101eea5eeea9a5ac9cf3abd (diff) |
[PATCH] fix impossible VmallocChunk
VmallocTotal: 34359738367 kB
VmallocUsed: 266288 kB
VmallocChunk: 18014366299193295 kB
is unsettling - x86_64 and some other architectures keep a separate address
range for modules in vmalloc's vmlist, which /proc/meminfo should pass over.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/proc/mmu.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/proc/mmu.c b/fs/proc/mmu.c index a7041038ad56..25d2d9c6e329 100644 --- a/fs/proc/mmu.c +++ b/fs/proc/mmu.c | |||
@@ -50,13 +50,23 @@ void get_vmalloc_info(struct vmalloc_info *vmi) | |||
50 | read_lock(&vmlist_lock); | 50 | read_lock(&vmlist_lock); |
51 | 51 | ||
52 | for (vma = vmlist; vma; vma = vma->next) { | 52 | for (vma = vmlist; vma; vma = vma->next) { |
53 | unsigned long addr = (unsigned long) vma->addr; | ||
54 | |||
55 | /* | ||
56 | * Some archs keep another range for modules in vmlist | ||
57 | */ | ||
58 | if (addr < VMALLOC_START) | ||
59 | continue; | ||
60 | if (addr >= VMALLOC_END) | ||
61 | break; | ||
62 | |||
53 | vmi->used += vma->size; | 63 | vmi->used += vma->size; |
54 | 64 | ||
55 | free_area_size = (unsigned long) vma->addr - prev_end; | 65 | free_area_size = addr - prev_end; |
56 | if (vmi->largest_chunk < free_area_size) | 66 | if (vmi->largest_chunk < free_area_size) |
57 | vmi->largest_chunk = free_area_size; | 67 | vmi->largest_chunk = free_area_size; |
58 | 68 | ||
59 | prev_end = vma->size + (unsigned long) vma->addr; | 69 | prev_end = vma->size + addr; |
60 | } | 70 | } |
61 | 71 | ||
62 | if (VMALLOC_END - prev_end > vmi->largest_chunk) | 72 | if (VMALLOC_END - prev_end > vmi->largest_chunk) |