From: Dave Hansen <haveblue@us.ibm.com>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Samuel Flory <sflory@rackable.com>, Stephen Lord <lord@sgi.com>,
Austin Gonyou <austin@coremetrics.com>,
Christian Guggenberger
<christian.guggenberger@physik.uni-regensburg.de>,
Linux Kernel <linux-kernel@vger.kernel.org>,
linux-xfs@oss.sgi.com
Subject: Re: 2.4.20pre5aa2
Date: Mon, 16 Sep 2002 09:03:41 -0700 [thread overview]
Message-ID: <3D8600DD.1010707@us.ibm.com> (raw)
In-Reply-To: 20020913125345.GO11605@dualathlon.random
[-- Attachment #1.1: Type: text/plain, Size: 1448 bytes --]
Andrea Arcangeli wrote:
> On Thu, Sep 12, 2002 at 07:14:14PM -0700, Samuel Flory wrote:
>
>>Andrea Arcangeli wrote:
>>
>>>On Thu, Sep 12, 2002 at 07:47:48PM -0500, Stephen Lord wrote:
>>>
>>>>How much memory is in the machine by the way? And Andrea, is the
>>>>vmalloc space size reduced in the 3G user space configuration?
>>>
>>>it's not reduced, it's the usual 128m.
>>>
>>>BTW, I forgot to say that to really take advantage of CONFIG_2G one
>>>should increase __VMALLOC_RESERVE too, it's not directly in function of
>>>the CONFIG_2G.
>>>
>>
>>So how much do you recommend increasing it? Currently it's:
>>include/asm-i386/page.h:#define __VMALLOC_RESERVE (128 << 20)
>>include/asm/page.h:#define __VMALLOC_RESERVE (128 << 20)
>
>
> you can try to compile with CONFIG_3G and to set __VMALLOC_RESERVE to
> (512 << 20) and see if it helps. If it only happens a bit later then
> it's most probably an address space leak, should be easy to track down
> some debugging instrumentation.
I just produced this little patch for 2.5. It should provide a bit of the extra
information that you were looking for. It adds some entries to /proc/meminfo
that look like this:
VMalTotal: 92123 kB
VmalUsed: 1264 kB
VMalChunk: 80315 kB
Total available, total used, and largest chunk available.
It is simple enough that a backport shouldn't be any problem at all. Anybody
interested?
--
Dave Hansen
haveblue@us.ibm.com
[-- Attachment #1.2: vmalloc-stats-2.5.34-mm4-2.patch --]
[-- Type: text/plain, Size: 2430 bytes --]
diff -ur linux-2.5.34-mm4/fs/proc/proc_misc.c linux-2.5.34-mm4-vmalloc-stats/fs/proc/proc_misc.c
--- linux-2.5.34-mm4/fs/proc/proc_misc.c Sat Sep 14 21:23:54 2002
+++ linux-2.5.34-mm4-vmalloc-stats/fs/proc/proc_misc.c Sat Sep 14 22:38:12 2002
@@ -38,6 +38,7 @@
#include <linux/smp_lock.h>
#include <linux/seq_file.h>
#include <linux/times.h>
+#include <linux/vmalloc.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
@@ -128,6 +129,40 @@
return proc_calc_metrics(page, start, off, count, eof, len);
}
+struct vmalloc_info {
+ unsigned long used;
+ unsigned long largest_chunk;
+};
+
+static struct vmalloc_info get_vmalloc_info(void)
+{
+ unsigned long prev_end = VMALLOC_START;
+ struct vm_struct* vma;
+ struct vmalloc_info vmi;
+ vmi.used = 0;
+
+ read_lock(&vmlist_lock);
+
+ if(!vmlist)
+ vmi.largest_chunk = (VMALLOC_END-VMALLOC_START);
+ else
+ vmi.largest_chunk = 0;
+
+ for (vma = vmlist; vma; vma = vma->next) {
+ unsigned long free_area_size =
+ (unsigned long)vma->addr - prev_end;
+ vmi.used += vma->size;
+ if (vmi.largest_chunk < free_area_size )
+ vmi.largest_chunk = free_area_size;
+ prev_end = vma->size + (unsigned long)vma->addr;
+ }
+ if(VMALLOC_END-prev_end > vmi.largest_chunk)
+ vmi.largest_chunk = VMALLOC_END-prev_end;
+
+ read_unlock(&vmlist_lock);
+ return vmi;
+}
+
extern atomic_t vm_committed_space;
static int meminfo_read_proc(char *page, char **start, off_t off,
@@ -138,6 +173,8 @@
struct page_state ps;
unsigned long inactive;
unsigned long active;
+ unsigned long vmtot;
+ struct vmalloc_info vmi;
get_page_state(&ps);
get_zone_counts(&active, &inactive);
@@ -150,6 +187,11 @@
si_swapinfo(&i);
committed = atomic_read(&vm_committed_space);
+ vmtot = (VMALLOC_END-VMALLOC_START)>>10;
+ vmi = get_vmalloc_info();
+ vmi.used >>= 10;
+ vmi.largest_chunk >>= 10;
+
/*
* Tagged format, for easy grepping and expansion.
*/
@@ -174,7 +216,10 @@
"Slab: %8lu kB\n"
"Committed_AS: %8u kB\n"
"PageTables: %8lu kB\n"
- "ReverseMaps: %8lu\n",
+ "ReverseMaps: %8lu\n"
+ "VmalTotal: %8lu kB\n"
+ "VmalUsed: %8lu kB\n"
+ "VmalChunk: %8lu kB\n",
K(i.totalram),
K(i.freeram),
K(i.sharedram),
@@ -195,7 +240,10 @@
K(ps.nr_slab),
K(committed),
K(ps.nr_page_table_pages),
- ps.nr_reverse_maps
+ ps.nr_reverse_maps,
+ vmtot,
+ vmi.used,
+ vmi.largest_chunk
);
#ifdef CONFIG_HUGETLB_PAGE
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next prev parent reply other threads:[~2002-09-16 16:00 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-11 18:16 2.4.20pre5aa2 Christian Guggenberger
2002-09-11 18:24 ` 2.4.20pre5aa2 Austin Gonyou
2002-09-11 18:28 ` 2.4.20pre5aa2 Christian Guggenberger
[not found] ` <1031769317.24629.28.camel@UberGeek.coremetrics.com>
2002-09-11 18:45 ` 2.4.20pre5aa2 Christian Guggenberger
2002-09-11 18:51 ` 2.4.20pre5aa2 Austin Gonyou
2002-09-11 18:41 ` 2.4.20pre5aa2 Andrea Arcangeli
2002-09-12 23:29 ` 2.4.20pre5aa2 Samuel Flory
2002-09-12 23:45 ` 2.4.20pre5aa2 Stephen Lord
2002-09-13 0:06 ` 2.4.20pre5aa2 Samuel Flory
2002-09-13 0:23 ` 2.4.20pre5aa2 Andrea Arcangeli
2002-09-13 0:47 ` 2.4.20pre5aa2 Stephen Lord
2002-09-13 0:54 ` 2.4.20pre5aa2 Andrea Arcangeli
2002-09-13 2:14 ` 2.4.20pre5aa2 Samuel Flory
2002-09-13 12:53 ` 2.4.20pre5aa2 Andrea Arcangeli
2002-09-13 21:09 ` 2.4.20pre5aa2 Samuel Flory
2002-09-13 21:18 ` 2.4.20pre5aa2 Andrea Arcangeli
2002-09-14 14:39 ` 2.4.20pre5aa2 Stephen Lord
2002-09-15 11:13 ` 2.4.20pre5aa2 Andi Kleen
2002-09-15 19:39 ` 2.4.20pre5aa2 Samuel Flory
2002-09-16 16:03 ` Dave Hansen [this message]
2002-09-16 16:20 ` 2.4.20pre5aa2 Andrea Arcangeli
2002-09-16 16:39 ` 2.4.20pre5aa2 Dave Hansen
2002-09-13 1:27 ` 2.4.20pre5aa2 Samuel Flory
2002-09-13 2:14 ` 2.4.20pre5aa2 Samuel Flory
2002-09-13 1:18 ` 2.4.20pre5aa2 Samuel Flory
2002-09-13 19:17 ` 2.4.20pre5aa2 Stephen Lord
2002-09-11 18:44 ` 2.4.20pre5aa2 Christoph Hellwig
2002-09-11 19:11 ` 2.4.20pre5aa2 Christian Guggenberger
-- strict thread matches above, loose matches on Subject: below --
2002-09-09 16:50 2.4.20pre5aa2 Andrea Arcangeli
2002-09-10 18:51 ` 2.4.20pre5aa2 Joe Kellner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D8600DD.1010707@us.ibm.com \
--to=haveblue@us.ibm.com \
--cc=andrea@suse.de \
--cc=austin@coremetrics.com \
--cc=christian.guggenberger@physik.uni-regensburg.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@oss.sgi.com \
--cc=lord@sgi.com \
--cc=sflory@rackable.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.