From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: hugh@veritas.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, npiggin@suse.de, riel@redhat.com,
mztabzr@0pointer.de, mpm@selenic.com
Subject: Re: [PATCH] mm: MADV_WILLNEED implementation for anonymous memory
Date: Thu, 31 Jan 2008 11:10:13 +0100 [thread overview]
Message-ID: <1201774213.28547.277.camel@lappy> (raw)
In-Reply-To: <20080131020516.be42c495.akpm@linux-foundation.org>
On Thu, 2008-01-31 at 02:05 -0800, Andrew Morton wrote:
> On Thu, 31 Jan 2008 10:53:26 +0100 Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
>
> >
> > On Thu, 2008-01-31 at 01:47 -0800, Andrew Morton wrote:
> > > On Thu, 31 Jan 2008 10:35:18 +0100 Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> > >
> > > >
> > > > On Thu, 2008-01-31 at 01:12 -0800, Andrew Morton wrote:
> > > >
> > > > > Implementation-wise: make_pages_present() _can_ be converted to do this.
> > > > > But it's a lot of patching, and the result will be a cleaner, faster and
> > > > > smaller core MM. Whereas your approach is easy, but adds more code and
> > > > > leaves the old stuff slow-and-dirty.
> > > > >
> > > > > Guess which approach is preferred? ;)
> > > >
> > > > Ok, I'll look at using make_pages_present().
> > >
> > > Am still curious to know what inspired this change. What are the use
> > > cases? Performance testing results, etc?
> >
> > Ah, that is Lennarts Pulse Audio thing, he has samples in memory which
> > might not have been used for a while, and he wants to be able to
> > pre-fetch those when he suspects they might need to be played. So that
> > once the audio thread comes along and stuffs them down /dev/dsp its all
> > nice in memory.
> >
> > Since its all soft real-time at best he feels its better to do a best
> > effort at not hitting swap than it is to strain the system with mlock
> > usage.
>
> hrm. Does he know about pthread_create()?
I'm very sure he does. So you're suggesting to just create a thread and
touch that memory and be done with it?
Lennart?
WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: hugh@veritas.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, npiggin@suse.de, riel@redhat.com,
mztabzr@0pointer.de, mpm@selenic.com
Subject: Re: [PATCH] mm: MADV_WILLNEED implementation for anonymous memory
Date: Thu, 31 Jan 2008 11:10:13 +0100 [thread overview]
Message-ID: <1201774213.28547.277.camel@lappy> (raw)
In-Reply-To: <20080131020516.be42c495.akpm@linux-foundation.org>
On Thu, 2008-01-31 at 02:05 -0800, Andrew Morton wrote:
> On Thu, 31 Jan 2008 10:53:26 +0100 Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
>
> >
> > On Thu, 2008-01-31 at 01:47 -0800, Andrew Morton wrote:
> > > On Thu, 31 Jan 2008 10:35:18 +0100 Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> > >
> > > >
> > > > On Thu, 2008-01-31 at 01:12 -0800, Andrew Morton wrote:
> > > >
> > > > > Implementation-wise: make_pages_present() _can_ be converted to do this.
> > > > > But it's a lot of patching, and the result will be a cleaner, faster and
> > > > > smaller core MM. Whereas your approach is easy, but adds more code and
> > > > > leaves the old stuff slow-and-dirty.
> > > > >
> > > > > Guess which approach is preferred? ;)
> > > >
> > > > Ok, I'll look at using make_pages_present().
> > >
> > > Am still curious to know what inspired this change. What are the use
> > > cases? Performance testing results, etc?
> >
> > Ah, that is Lennarts Pulse Audio thing, he has samples in memory which
> > might not have been used for a while, and he wants to be able to
> > pre-fetch those when he suspects they might need to be played. So that
> > once the audio thread comes along and stuffs them down /dev/dsp its all
> > nice in memory.
> >
> > Since its all soft real-time at best he feels its better to do a best
> > effort at not hitting swap than it is to strain the system with mlock
> > usage.
>
> hrm. Does he know about pthread_create()?
I'm very sure he does. So you're suggesting to just create a thread and
touch that memory and be done with it?
Lennart?
--
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:[~2008-01-31 10:10 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-30 17:28 [PATCH] mm: MADV_WILLNEED implementation for anonymous memory Peter Zijlstra
2008-01-30 17:28 ` [PATCH] mm: MADV_WILLNEED implementation for anonymous memory, " Peter Zijlstra
2008-01-30 18:15 ` [PATCH] " Matt Mackall
2008-01-30 18:15 ` Matt Mackall
2008-01-30 22:40 ` Andrew Morton
2008-01-30 22:40 ` Andrew Morton
2008-01-31 8:44 ` Peter Zijlstra
2008-01-31 8:44 ` Peter Zijlstra
2008-01-31 9:12 ` Andrew Morton
2008-01-31 9:12 ` Andrew Morton
2008-01-31 9:35 ` Peter Zijlstra
2008-01-31 9:35 ` Peter Zijlstra
2008-01-31 9:47 ` Andrew Morton
2008-01-31 9:47 ` Andrew Morton
2008-01-31 9:53 ` Peter Zijlstra
2008-01-31 9:53 ` Peter Zijlstra
2008-01-31 10:05 ` Andrew Morton
2008-01-31 10:05 ` Andrew Morton
2008-01-31 10:10 ` Peter Zijlstra [this message]
2008-01-31 10:10 ` Peter Zijlstra
2008-01-31 10:18 ` Andrew Morton
2008-01-31 10:18 ` Andrew Morton
2008-01-31 10:15 ` Andi Kleen
2008-01-31 10:15 ` Andi Kleen
2008-01-31 10:19 ` Andrew Morton
2008-01-31 10:19 ` Andrew Morton
2008-01-31 11:06 ` Andi Kleen
2008-01-31 11:06 ` Andi Kleen
2008-01-31 10:52 ` Rik van Riel
2008-01-31 10:52 ` Rik van Riel
2008-01-31 11:32 ` Andi Kleen
2008-01-31 11:32 ` Andi Kleen
2008-01-31 11:09 ` Rik van Riel
2008-01-31 11:09 ` Rik van Riel
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=1201774213.28547.277.camel@lappy \
--to=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mpm@selenic.com \
--cc=mztabzr@0pointer.de \
--cc=npiggin@suse.de \
--cc=riel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.