From: Paul Warren <pdw@ex-parrot.com>
To: Blaisorblade <blaisorblade@yahoo.it>
Cc: user-mode-linux-devel@lists.sourceforge.net,
Chris Wedgwood <cw@f00f.org>, itamar <itamar@ispbrasil.com.br>
Subject: Re: [uml-devel] Re: [uml-user] uml help __alloc_pages: 0-order allocation failed (gfp=0xf0/0)
Date: Sun, 20 Mar 2005 22:25:07 +0000 [thread overview]
Message-ID: <20050320222507.B15902@sphinx.mythic-beasts.com> (raw)
In-Reply-To: <200503172049.39200.blaisorblade@yahoo.it>; from blaisorblade@yahoo.it on Thu, Mar 17, 2005 at 08:49:38PM +0100
[-- Attachment #1: Type: text/plain, Size: 1075 bytes --]
[ trimmed cc to just -devel list]
On Thu, Mar 17, 2005 at 08:49:38PM +0100, Blaisorblade wrote:
> Paul Warren said that there is a leak in 2.4 UML related to hostfs stuff.. and
> I already saw this message from some 2.4 recent UMLs. I hope Paul Warren can
> explain what he saw and help us...
>
> In case we have confirmation it's hostfs-related, we only need to go back to
> the stable 2.4.24-1um hostfs code (i.e. pre-humfs), as I already do in the
> 2.4-bs tree.
OK, our setup is that we have a load of distribution mirrors that are
NFS mounted onto the host server. The guests then mount these using
hostfs. We first noticed that a nightly updatedb was causing the amount
of memory that could be malloced to decrease. We found that doing a
"find" across the entire hostfs mount also did the trick.
I've attached the script and program that we used to meause the maximum
amount of memory that can be malloced. We then ran:
while : ; do ./maxalloc ; updatedb ; done
... and watched the memory leak away.
Please let me know if you want some more info.
Paul
[-- Attachment #2: maxalloc --]
[-- Type: text/plain, Size: 284 bytes --]
#!/bin/sh
hi=64
lo=1
while [ $[ $hi - $lo ] -gt 1 ] ; do
mid=$[ ($hi + $lo) / 2 ]
echo -n "trying $mid MB..."
if /tmp/alloc $[ $mid * 1024 * 1024 ] ; then
lo=$mid
echo "OK"
else
hi=$mid
fi
echo "$lo $hi $[ $hi - $lo ]"
done
echo $hi MB
[-- Attachment #3: alloc.c --]
[-- Type: text/plain, Size: 384 bytes --]
#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
size_t amt;
char *a, *p;
if (argv[1]) amt = (size_t)atoi(argv[1]);
else amt = 1024 * 1024;
if (!(a = malloc(amt))) {
fprintf(stderr, "failed to malloc %u bytes\n", amt);
return 1;
}
for (p = a; p < a + amt; ++p) *p = (char)p;
return 0;
}
next prev parent reply other threads:[~2005-03-20 22:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-17 18:52 [uml-devel] uml help __alloc_pages: 0-order allocation failed (gfp=0xf0/0) itamar
2005-03-17 19:00 ` [uml-devel] Re: [uml-user] " Chris Wedgwood
2005-03-17 19:13 ` itamar
2005-03-17 19:25 ` Chris Wedgwood
2005-03-17 19:49 ` Blaisorblade
2005-03-20 22:25 ` Paul Warren [this message]
2005-03-22 17:41 ` Blaisorblade
2005-03-17 19:57 ` Paul Warren
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=20050320222507.B15902@sphinx.mythic-beasts.com \
--to=pdw@ex-parrot.com \
--cc=blaisorblade@yahoo.it \
--cc=cw@f00f.org \
--cc=itamar@ispbrasil.com.br \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox