* [PATCH] fix impossible VmallocChunk
@ 2005-05-07 17:57 Hugh Dickins
0 siblings, 0 replies; only message in thread
From: Hugh Dickins @ 2005-05-07 17:57 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
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>
--- 2.6.12-rc4/fs/proc/mmu.c 2005-03-02 07:37:50.000000000 +0000
+++ linux/fs/proc/mmu.c 2005-05-07 18:32:32.000000000 +0100
@@ -50,13 +50,23 @@ void get_vmalloc_info(struct vmalloc_inf
read_lock(&vmlist_lock);
for (vma = vmlist; vma; vma = vma->next) {
+ unsigned long addr = (unsigned long) vma->addr;
+
+ /*
+ * Some archs keep another range for modules in vmlist
+ */
+ if (addr < VMALLOC_START)
+ continue;
+ if (addr >= VMALLOC_END)
+ break;
+
vmi->used += vma->size;
- free_area_size = (unsigned long) vma->addr - prev_end;
+ free_area_size = addr - prev_end;
if (vmi->largest_chunk < free_area_size)
vmi->largest_chunk = free_area_size;
- prev_end = vma->size + (unsigned long) vma->addr;
+ prev_end = vma->size + addr;
}
if (VMALLOC_END - prev_end > vmi->largest_chunk)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-05-07 17:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-07 17:57 [PATCH] fix impossible VmallocChunk Hugh Dickins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®