From: Anton Blanchard <anton@samba.org>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Rik van Riel <riel@redhat.com>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Eric Dumazet <dada1@cosmosbay.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
Ulrich Drepper <drepper@redhat.com>
Subject: Re: [PATCH] make MADV_FREE lazily free memory
Date: Mon, 16 Apr 2007 13:39:45 -0500 [thread overview]
Message-ID: <20070416183945.GA10067@kryten> (raw)
In-Reply-To: <20070416163057.GH355@devserv.devel.redhat.com>
Hi Jakub,
> That would mean an additional syscall. Furthermore, if you allocate a big
> chunk of memory, dirty it, then free (with madvise (MADV_FREE)) it and soon
> allocate the same size of memory again, it is better to start that with
> non-dirty memory, it might be that this time you e.g. don't modify a big
> part of the chunk. If all that memory was kept dirty all the time and
> just marked/unmarked for lazy reuse with MADV_FREE/MADV_UNDO_FREE, all that
> memory would need to be saved to disk when paging out as it was marked
> dirty, while with current Rik's MADV_FREE that will happen only for pages
> that were actually dirtied after the last malloc.
Yep this all makes sense. I was looking at it from the other angle where
on some workloads we have to force malloc to use brk for best
performance. Im sure the MADV_FREE changes will close that gap but it
would be interesting to see if there is still a gap on the problem
workloads. Maybe Im worrying about nothing.
Anton
WARNING: multiple messages have this Message-ID (diff)
From: Anton Blanchard <anton@samba.org>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Rik van Riel <riel@redhat.com>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Eric Dumazet <dada1@cosmosbay.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
Ulrich Drepper <drepper@redhat.com>
Subject: Re: [PATCH] make MADV_FREE lazily free memory
Date: Mon, 16 Apr 2007 13:39:45 -0500 [thread overview]
Message-ID: <20070416183945.GA10067@kryten> (raw)
In-Reply-To: <20070416163057.GH355@devserv.devel.redhat.com>
Hi Jakub,
> That would mean an additional syscall. Furthermore, if you allocate a big
> chunk of memory, dirty it, then free (with madvise (MADV_FREE)) it and soon
> allocate the same size of memory again, it is better to start that with
> non-dirty memory, it might be that this time you e.g. don't modify a big
> part of the chunk. If all that memory was kept dirty all the time and
> just marked/unmarked for lazy reuse with MADV_FREE/MADV_UNDO_FREE, all that
> memory would need to be saved to disk when paging out as it was marked
> dirty, while with current Rik's MADV_FREE that will happen only for pages
> that were actually dirtied after the last malloc.
Yep this all makes sense. I was looking at it from the other angle where
on some workloads we have to force malloc to use brk for best
performance. Im sure the MADV_FREE changes will close that gap but it
would be interesting to see if there is still a gap on the problem
workloads. Maybe Im worrying about nothing.
Anton
--
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:[~2007-04-16 18:42 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-11 4:30 [PATCH] make MADV_FREE lazily free memory Rik van Riel
2007-04-11 22:41 ` Eric Dumazet
2007-04-11 22:41 ` Eric Dumazet
2007-04-11 22:56 ` Rik van Riel
2007-04-11 22:56 ` Rik van Riel
2007-04-12 5:44 ` Eric Dumazet
2007-04-12 5:44 ` Eric Dumazet
2007-04-12 6:08 ` Nick Piggin
2007-04-12 6:08 ` Nick Piggin
2007-04-12 6:12 ` Nick Piggin
2007-04-12 6:12 ` Nick Piggin
2007-04-12 7:22 ` Rik van Riel
2007-04-12 7:22 ` Rik van Riel
2007-04-12 13:14 ` Nick Piggin
2007-04-12 13:14 ` Nick Piggin
2007-04-12 20:58 ` Rik van Riel
2007-04-13 0:34 ` Nick Piggin
2007-04-13 0:34 ` Nick Piggin
2007-04-16 16:10 ` Anton Blanchard
2007-04-16 16:10 ` Anton Blanchard
2007-04-16 16:30 ` Jakub Jelinek
2007-04-16 16:30 ` Jakub Jelinek
2007-04-16 18:39 ` Anton Blanchard [this message]
2007-04-16 18:39 ` Anton Blanchard
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=20070416183945.GA10067@kryten \
--to=anton@samba.org \
--cc=dada1@cosmosbay.com \
--cc=drepper@redhat.com \
--cc=jakub@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
--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.