From: Badari Pulavarty <pbadari@us.ibm.com>
To: Jeff Dike <jdike@addtoit.com>
Cc: Hugh Dickins <hugh@veritas.com>, linux-mm <linux-mm@kvack.org>
Subject: Re: [RFC][PATCH] OVERCOMMIT_ALWAYS extension
Date: Wed, 19 Oct 2005 14:21:48 -0700 [thread overview]
Message-ID: <1129756908.8716.24.camel@localhost.localdomain> (raw)
In-Reply-To: <20051019183202.GA8120@localhost.localdomain>
On Wed, 2005-10-19 at 14:32 -0400, Jeff Dike wrote:
> On Wed, Oct 19, 2005 at 06:56:59PM +0100, Hugh Dickins wrote:
> > To achieve the effect you want, along these lines, there needs to be
> > a way to truncate pages out of the middle of the shm object: I believe
> > "punch holes" is the phrase that's been used when this kind of behaviour
> > has been discussed (not particularly in relation to tmpfs) before.
> > Some have proposed a sys_punch syscall to the VFS.
> >
> > Jeff Dike had a patch for like functionality for UML, via a /dev/anon
> > to tmpfs, nearly two years ago. I've kept his mail in my TODO folder
> > ever since, ambivalent about it, and never got around to giving it the
> > review needed. I've a feeling time has moved on so far that Jeff may
> > now be achieving the effect he needs by other means (remap_file_pages?).
> >
> > Is /dev/anon still of interest to you, Jeff? Not that I'm any closer
> > to the point of thinking about it now than then, just want to factor
> > your idea in with what Badari is thinking of.
>
> Yes, either sys_punch or something like /dev/anon is still needed. I need to
> be able to dirty file-backed pages and tell the host to drop them as though
> they were clean. Punching a hole in the middle of the file, effectively
> sparsing it, or having a special driver that drops pages when their map count
> goes to zero will both work for me. This will avoid having the host swap out
> pages that are clean from the UML point of view (but dirty from the host's
> point of view). It will also allow me to free memory back to the host,
> allowing memory to be added and removed dynamically from UML instances.
My requirement is a simple subset of yours. All I want is ability to
completely drop range of pages in a shared memory segment (as if they
are clean). madvise(MADV_DISCARD) would be good enough for me. In fact,
I have another weird requirement that - it should be able to drop these
pages even when map count is NOT zero. I am still thinking about this
one. Our database folks, map these regions into different db2 processes
and they want this to work from any given process (even if other
processes have it mapped). I am not sure what would happen, some
other process touches it after we dropped it - may be a zero page ?
Thanks,
Badari
--
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-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2005-10-19 21:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-17 17:30 [RFC] " Badari Pulavarty
2005-10-17 18:13 ` Hugh Dickins
2005-10-17 18:25 ` Hugh Dickins
2005-10-17 23:14 ` Badari Pulavarty
2005-10-18 16:05 ` [RFC][PATCH] " Badari Pulavarty
2005-10-19 17:56 ` Hugh Dickins
2005-10-19 18:32 ` Jeff Dike
2005-10-19 21:21 ` Badari Pulavarty [this message]
2005-10-19 22:38 ` Jeff Dike
2005-10-19 18:50 ` Badari Pulavarty
2005-10-19 19:12 ` Darren Hart
2005-10-19 20:10 ` Hugh Dickins
2005-10-19 20:47 ` Jeff Dike
2005-10-20 15:11 ` Badari Pulavarty
2005-10-20 17:27 ` Jeff Dike
2005-10-20 22:37 ` Badari Pulavarty
2005-10-24 20:04 ` Hugh Dickins
2005-10-24 20:22 ` Darren Hart
2005-10-24 20:24 ` Badari Pulavarty
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=1129756908.8716.24.camel@localhost.localdomain \
--to=pbadari@us.ibm.com \
--cc=hugh@veritas.com \
--cc=jdike@addtoit.com \
--cc=linux-mm@kvack.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