From: Andrea Arcangeli <andrea@suse.de>
To: Chris Wright <chrisw@osdl.org>
Cc: Darren Hart <dvhltc@us.ibm.com>,
hugh@veritas.com, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] allow vma merging with mlock et. al.
Date: Sat, 26 Feb 2005 01:56:21 +0100 [thread overview]
Message-ID: <20050226005620.GN20715@opteron.random> (raw)
In-Reply-To: <20050225233806.GD15867@shell0.pdx.osdl.net>
On Fri, Feb 25, 2005 at 03:38:06PM -0800, Chris Wright wrote:
> I don't have a good sampling of applications. The one's I've used are
> temporal like gpg, or they mlockall the whole thing and never look back.
> But I did a quick benchmark since I was curious, a simple loop of a
> million lock/unlock cycles of a page that could trigger a merge:
>
> vanilla
> (no merge): 659706 usecs
>
> patched
> (merge): 3567020 usecs
>
> Heh, I was surprised to see it that much slower.
The object of the merge is to save memory, and to reduce the size of the
rbtree that might payoff during other operations (with a smaller tree,
lookups will be faster too). If you only measure the time of creating
and removing a mapping then it should be normal that you see a slowdown
since merging involves more work than non-merging. The payoff is
supposed to be in the other operations.
The reason mlock doesn't merge is that nobody asked for it yet, but it
was originally supposed to merge too (I stopped at mremap since mlock
wasn't high prio to fixup). But the long term plan was to eventually add
merging to mlock too and it's good that you're optimizing it now.
next prev parent reply other threads:[~2005-02-26 0:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-25 0:43 [PATCH] vm: mlock superfluous variable Darren Hart
2005-02-25 17:11 ` Chris Wright
2005-02-25 22:05 ` [PATCH] allow vma merging with mlock et. al Chris Wright
2005-02-25 22:26 ` Darren Hart
2005-02-25 23:38 ` Chris Wright
2005-02-26 0:56 ` Andrea Arcangeli [this message]
2005-02-26 1:13 ` Chris Wright
2005-02-26 17:20 ` Hugh Dickins
2005-02-28 20:33 ` Chris Wright
2005-02-28 20:53 ` Hugh Dickins
2005-02-25 22:21 ` [PATCH] vm: mlock superfluous variable Darren Hart
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=20050226005620.GN20715@opteron.random \
--to=andrea@suse.de \
--cc=akpm@osdl.org \
--cc=chrisw@osdl.org \
--cc=dvhltc@us.ibm.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.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 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.