linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	hugh@veritas.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, npiggin@suse.de, mztabzr@0pointer.de,
	mpm@selenic.com
Subject: Re: [PATCH] mm: MADV_WILLNEED implementation for anonymous memory
Date: Thu, 31 Jan 2008 06:09:40 -0500	[thread overview]
Message-ID: <20080131060940.37a58559@riellaptop.surriel.com> (raw)
In-Reply-To: <20080131113224.GB31090@one.firstfloor.org>

On Thu, 31 Jan 2008 12:32:24 +0100
Andi Kleen <andi@firstfloor.org> wrote:
> On Thu, Jan 31, 2008 at 05:52:09AM -0500, Rik van Riel wrote:

> > Don't malloc() and free() hopelessly fragment memory
> > over time, ensuring that little related data can be
> > found inside each 1MB chunk if the process is large
> > enough?  (say, firefox)
> 
> Even if they do (I don't know if it's true or not) it does not really 
> matter because on modern hard disks/systems it does not cost less to 
> transfer 1MB versus 4K. The actual threshold seems to be rising in
> fact.

That is definately true.

> The only drawback is that the swap might be full sooner, but 
> I would actually consider this a feature because it would likely
> end many prolonged oom death dances much sooner.

A second drawback would be that we evict more potentially
useful data every time we swap in a whole lot of extra
data around the little bit of data we need.

On the other hand, swapping should be the exception on
many of today's workloads.

Maybe we can measure how many of the swapped in pages end
up being used and how many are evicted again without being
used and automatically change our chunk size based on those
statistics?

I would expect most desktop systems to end up with large
chunks, because they rarely swap.

--
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:[~2008-01-31 11:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-30 17:28 [PATCH] mm: MADV_WILLNEED implementation for anonymous memory, mm: MADV_WILLNEED implementation for anonymous memory Peter Zijlstra
2008-01-30 18:15 ` [PATCH] " Matt Mackall
2008-01-30 22:40 ` Andrew Morton
2008-01-31  8:44   ` Peter Zijlstra
2008-01-31  9:12     ` Andrew Morton
2008-01-31  9:35       ` Peter Zijlstra
2008-01-31  9:47         ` Andrew Morton
2008-01-31  9:53           ` Peter Zijlstra
2008-01-31 10:05             ` Andrew Morton
2008-01-31 10:10               ` Peter Zijlstra
2008-01-31 10:18                 ` Andrew Morton
2008-01-31 10:15             ` Andi Kleen
2008-01-31 10:19               ` Andrew Morton
2008-01-31 11:06                 ` Andi Kleen
2008-01-31 10:52                   ` Rik van Riel
2008-01-31 11:32                     ` Andi Kleen
2008-01-31 11:09                       ` Rik van Riel [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=20080131060940.37a58559@riellaptop.surriel.com \
    --to=riel@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.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 \
    /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).