From: David Howells <dhowells@redhat.com>
To: Bernd Schmidt <bernds_cb1@t-online.de>
Cc: dhowells@redhat.com,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Wu, Bryan" <Bryan.Wu@analog.com>
Subject: Re: [PATCH] NOMMU: Separate out VMAs
Date: Mon, 20 Aug 2007 16:12:48 +0100 [thread overview]
Message-ID: <16451.1187622768@redhat.com> (raw)
In-Reply-To: <46C58B4E.4080803@t-online.de>
Bernd Schmidt <bernds_cb1@t-online.de> wrote:
> In do_mmap_private, I've commented out the logic to free excess pages, as it
> fragments terribly
I wonder if there's a good heuristic for this. The problem is that whilst
not releasing excess pages _may_ seem like a good idea, if your system is
something like a single persistent app, then it really is not.
For instance, if such an app allocates a byte over 16MB (perhaps implicitly in
the binfmt driver), then you'd completely waste a large chunk of RAM. In the
16MB+1 case, the wastage would be a byte less than 16MB.
> and causes a simple
> while true; do cat /proc/buddyinfo; done
> loop to go oom.
Are you sure it's not just another leak?
> Also, I think you're freeing high-order pages unaligned to
> their order?
Yeah, but some of the pages might still be in use when we want to release
them.
> In shrink_vma, we must save the mm across calls to remove_vma_from_mm (oops
> when telnetting into the box).
I'll have a look, but I don't see that.
> In do_munmap, we can deal with freeing more than one vma. I've not touched
> the rb-tree logic in the shared file case, as I have no idea what it's trying
> to do given that only exact matches are allowed.
I'd generally rather not do this. You can't use MAP_FIXED to request adjacent
regions, so why should you anticipate there would be any?
> It still does not survive my mmap stress-tester, so I'll keep looking.
Thanks.
> Why do we need vm_regions for anonymous memory? Wouldn't it be enough to just
> have a VMA?
It makes it simpler to have a common way of allocating memory for both anon
regions and file regions.
David
next prev parent reply other threads:[~2007-08-20 15:13 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-08 13:53 [PATCH, RFD]: Unbreak no-mmu mmap Bernd Schmidt
2007-06-09 19:10 ` Matt Mackall
2007-06-11 21:08 ` Robin Getz
2007-06-11 22:09 ` Mike Frysinger
2007-06-11 23:04 ` Bernd Schmidt
2007-06-11 23:22 ` Mike Frysinger
2007-06-19 23:26 ` Robin Getz
2007-06-20 2:38 ` Bryan Wu
2007-06-20 3:00 ` Paul Mundt
2007-06-20 3:18 ` Bryan Wu
2007-06-27 5:50 ` Greg Ungerer
2007-06-22 12:59 ` David Howells
2007-06-22 13:35 ` David Howells
2007-06-22 14:29 ` [PATCH] NOMMU: " David Howells
2007-08-01 12:29 ` [PATCH, RFD]: " David Howells
2007-08-03 14:03 ` [PATCH] NOMMU: Separate out VMAs David Howells
2007-08-07 13:12 ` Bernd Schmidt
2007-08-07 13:17 ` David Howells
2007-08-07 13:21 ` David Howells
2007-08-07 13:37 ` Bernd Schmidt
2007-08-07 14:03 ` David Howells
2007-08-17 11:49 ` Bernd Schmidt
2007-08-20 15:12 ` David Howells [this message]
2007-08-20 16:02 ` Bernd Schmidt
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=16451.1187622768@redhat.com \
--to=dhowells@redhat.com \
--cc=Bryan.Wu@analog.com \
--cc=bernds_cb1@t-online.de \
--cc=linux-kernel@vger.kernel.org \
/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