From: David Mosberger <davidm@napali.hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: RE: [Linux-ia64] Fix for for memory leak in IA32 mmap
Date: Tue, 05 Mar 2002 20:09:31 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590701905229@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590701905222@msgid-missing>
>>>>> On Tue, 5 Mar 2002 11:44:20 -0800 , "Luck, Tony" <tony.luck@intel.com> said:
Tony> I'm not sure that you really need a list ... in fact if you
Tony> have a list, I think that I can still come up with
Tony> pathalogical programs that will break: E.g. I might use
Tony> several mmap() calls to set up some blocks of memory, but
Tony> clear them all with one call to munmap() that spans them all,
Tony> or I might not do any munmap() at all and just mmap(MAP_FIXED)
Tony> things onto the same addresses (since mmap will throw away
Tony> existing mappings before creating new ones). Just using the
Tony> bitmap to determine whether to round up the end (and round
Tony> down the start) address of munmap() requests based on whether
Tony> the partial pages have been used should solve most of the
Tony> problems.
That clearly would be wrong. I think Don was planning to handle the
other cases you're mentioning as well.
Tony> IA-32 programs are limited to the bottom 4G of address space,
Tony> and they believe that it is divided into 2^20 * 4KB pages. A
Tony> bitmap for the whole of that would be 128KB, which might be
Tony> somewhat high of an overhead for every IA-32 program ... but a
Tony> two-level table would most likely be very sparsely filled,
Tony> limiting the memory overhead to something acceptable.
Sounds like an interesting idea.
Tony> Even with this change, there will still be programs that can
Tony> only work correctly with a 4k kernel pagesize (e.g. a program
Tony> that maps a 4K page from two different files, read+write into
Tony> the same 16K page)
Certainly. Anyone interested in exploring subpage support? This
could also be useful for I/O devices... I am somewhat doubtful that
the benefits would outweight the costs, but with some clever ideas,
perhaps it would be possible to make it work for the important cases
without incurring the full cost.
--david
next prev parent reply other threads:[~2002-03-05 20:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-05 15:13 [Linux-ia64] Fix for for memory leak in IA32 mmap Don Dugger
2002-03-05 17:34 ` David Mosberger
2002-03-05 17:46 ` Don Dugger
2002-03-05 18:59 ` David Mosberger
2002-03-05 19:44 ` Luck, Tony
2002-03-05 20:06 ` n0ano
2002-03-05 20:09 ` David Mosberger [this message]
2002-03-05 21:49 ` Luck, Tony
2002-03-05 22:18 ` n0ano
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=marc-linux-ia64-105590701905229@msgid-missing \
--to=davidm@napali.hpl.hp.com \
--cc=linux-ia64@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