From: Richard Guenther <richard.guenther@student.uni-tuebingen.de>
To: "Stephen C. Tweedie" <sct@redhat.com>
Cc: Andrew Morton <andrewm@uow.edu.au>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: sys_exit() and zap_page_range()
Date: Tue, 11 Jul 2000 17:23:08 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.21.0007111713580.31978-100000@fs1.dekanat.physik.uni-tuebingen.de> (raw)
In-Reply-To: <20000711143558.E1054@redhat.com>
On Tue, 11 Jul 2000, Stephen C. Tweedie wrote:
> Hi,
>
> On Tue, Jul 11, 2000 at 09:24:56PM +1000, Andrew Morton wrote:
> >
> > Nope. Take out the msyncs and it still does it.
>
> Unmapping a writable region results in an implicit msync. That
> includes exit() and munmap().
Can we have some feature like deferred munmap() which recycles
virtual memory space only if needed? I.e. basically an asynchronous
munmap() which allows an already munmapped section to be re-mapped
without having the implicit msync() and future page-ins?
So basically
mem = mmap(NULL, PAGESIZE, PROT_READ|PROT_WRITE, MAP_SHARED, file,
0);
/* muck with mem */
special_munmap(mem, PAGESIZE);
/* re-map the same memory again - dont care if the resulting
* virtual address is the same as above. */
mem = mmap(.....);
etc.
with the munmap() not causing disk activity, instead the physical page
(or the mapping itself) gets cached and reused by the following mmap().
Of course implementing this via munmap() breaks posix - so we might want
to do it using madvise(,, MADV_LAZY_UNMAP) or the like? Btw. having a
mmap() operation that works recursively, i.e. returns the same virtual
mapping for the same mapping and keeping a reference count, would be cool,
too. [In case you're wondering, I'm doing virtual memory management in
userspace]
Richard.
--
Richard Guenther <richard.guenther@student.uni-tuebingen.de>
WWW: http://www.anatom.uni-tuebingen.de/~richi/
The GLAME Project: http://www.glame.de/
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
prev parent reply other threads:[~2000-07-11 15:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-07 14:43 Andrew Morton
2000-07-07 16:42 ` Manfred Spraul
2000-07-09 17:30 ` Philipp Rumpf
2000-07-09 17:42 ` Arjan van de Ven
2000-07-09 23:54 ` Andrew Morton
2000-07-10 9:53 ` Philipp Rumpf
2000-07-10 15:36 ` Andrew Morton
2000-07-10 17:34 ` Philipp Rumpf
2000-07-11 8:39 ` Stephen C. Tweedie
2000-07-11 11:24 ` Andrew Morton
2000-07-11 13:35 ` Stephen C. Tweedie
2000-07-11 15:23 ` Richard Guenther [this message]
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=Pine.LNX.4.21.0007111713580.31978-100000@fs1.dekanat.physik.uni-tuebingen.de \
--to=richard.guenther@student.uni-tuebingen.de \
--cc=andrewm@uow.edu.au \
--cc=linux-mm@kvack.org \
--cc=sct@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox