linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Hommey <mh@glandium.org>
To: Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	Arun Sharma <asharma@fb.com>,
	sanjay@google.com, Paul Turner <pjt@google.com>,
	David Rientjes <rientjes@google.com>,
	John Stultz <john.stultz@linaro.org>,
	Christoph Lameter <cl@linux.com>,
	Android Kernel Team <kernel-team@android.com>,
	Robert Love <rlove@google.com>, Mel Gorman <mel@csn.ul.ie>,
	Hugh Dickins <hughd@google.com>,
	Dave Hansen <dave@linux.vnet.ibm.com>,
	Rik van Riel <riel@redhat.com>,
	Dave Chinner <david@fromorbit.com>, Neil Brown <neilb@suse.de>,
	Taras Glek <tglek@mozilla.com>,
	KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [RFC v3] Support volatile range for anon vma
Date: Tue, 11 Dec 2012 09:29:03 +0100	[thread overview]
Message-ID: <20121211082903.GA27441@glandium.org> (raw)
In-Reply-To: <20121211081117.GH22698@blaptop>

On Tue, Dec 11, 2012 at 05:11:17PM +0900, Minchan Kim wrote:
> On Tue, Dec 11, 2012 at 08:59:50AM +0100, Mike Hommey wrote:
> > On Tue, Dec 11, 2012 at 04:37:44PM +0900, Minchan Kim wrote:
> > > On Tue, Dec 11, 2012 at 08:17:42AM +0100, Mike Hommey wrote:
> > > > On Tue, Dec 11, 2012 at 11:41:04AM +0900, Minchan Kim wrote:
> > > > > - What's the madvise(addr, length, MADV_VOLATILE)?
> > > > > 
> > > > >   It's a hint that user deliver to kernel so kernel can *discard*
> > > > >   pages in a range anytime.
> > > > > 
> > > > > - What happens if user access page(ie, virtual address) discarded
> > > > >   by kernel?
> > > > > 
> > > > >   The user can see zero-fill-on-demand pages as if madvise(DONTNEED).
> > > > 
> > > > What happened to getting SIGBUS?
> > > 
> > > I thought it could force for user to handle signal.
> > > If user can receive signal, what can he do?
> > > Maybe he can call madivse(NOVOLATILE) in my old version but I removed it
> > > in this version so user don't need handle signal handling.
> > 
> > NOVOLATILE and signal throwing are two different and not necessarily
> > related needs. We (Mozilla) could probably live without NOVOLATILE,
> > but certainly not without signal throwing.
> 
> What's shortcoming if we don't provide signal handling?
> Could you explain how you want to signal in your allocator?

The main use case we have for signals is not an allocator. We're
currently using ashmem to decompress libraries on Android. We would like
to use volatile memory for that instead, so that unused pages can be
discarded. With NOVOLATILE, or when getting zero-filled pages, that just
doesn't pan out: you may well be jumping in the volatile memory from
anywhere, and you can't check the status of the page you're jumping into
before jumping. Thus you need to be signaled when reaching a discarded
page.

Mike

--
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>

  reply	other threads:[~2012-12-11  8:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-11  2:34 [RFC v3] Support volatile range for anon vma Minchan Kim
2012-12-11  2:41 ` Minchan Kim
2012-12-11  7:17   ` Mike Hommey
2012-12-11  7:37     ` Minchan Kim
2012-12-11  7:59       ` Mike Hommey
2012-12-11  8:11         ` Minchan Kim
2012-12-11  8:29           ` Mike Hommey [this message]
2012-12-11  8:45             ` Minchan Kim
2012-12-12  6:43   ` Wanpeng Li
2012-12-12  6:43   ` Wanpeng Li
2012-12-12  8:17     ` Wanpeng Li
2012-12-12  8:17     ` Wanpeng Li
     [not found]     ` <50c83d9b.49fe2a0a.57ee.ffff90b0SMTPIN_ADDED_BROKEN@mx.google.com>
2012-12-12  8:42       ` Minchan Kim
     [not found]   ` <50c827cb.ce98320a.7d38.ffffad3fSMTPIN_ADDED_BROKEN@mx.google.com>
2012-12-12  8:15     ` Minchan Kim
2012-12-11 18:45 ` John Stultz
2012-12-11 23:21   ` Minchan Kim

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=20121211082903.GA27441@glandium.org \
    --to=mh@glandium.org \
    --cc=akpm@linux-foundation.org \
    --cc=asharma@fb.com \
    --cc=cl@linux.com \
    --cc=dave@linux.vnet.ibm.com \
    --cc=david@fromorbit.com \
    --cc=hughd@google.com \
    --cc=john.stultz@linaro.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kernel-team@android.com \
    --cc=kosaki.motohiro@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=minchan@kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=neilb@suse.de \
    --cc=pjt@google.com \
    --cc=riel@redhat.com \
    --cc=rientjes@google.com \
    --cc=rlove@google.com \
    --cc=sanjay@google.com \
    --cc=tglek@mozilla.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;
as well as URLs for NNTP newsgroup(s).