From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Benjamin LaHaise <bcrl@kvack.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Nick Piggin <nickpiggin@yahoo.com.au>
Subject: Re: [PATCH] use local_t for page statistics
Date: Fri, 6 Jan 2006 23:00:29 -0200 [thread overview]
Message-ID: <20060107010029.GA5087@dmt.cnet> (raw)
In-Reply-To: <20060106163313.38c08e37.akpm@osdl.org>
On Fri, Jan 06, 2006 at 04:33:13PM -0800, Andrew Morton wrote:
> Benjamin LaHaise <bcrl@kvack.org> wrote:
> >
> > The patch below converts the mm page_states counters to use local_t.
> > mod_page_state shows up in a few profiles on x86 and x86-64 due to the
> > disable/enable interrupts operations touching the flags register. On
> > both my laptop (Pentium M) and P4 test box this results in about 10
> > additional /bin/bash -c exit 0 executions per second (P4 went from ~759/s
> > to ~771/s). Tested on x86 and x86-64. Oh, also add a pgcow statistic
> > for the number of COW page faults.
>
> Bah. I think this is a better approach than the just-merged
> mm-page_state-opt.patch, so I should revert that patch first?
Don't think so - local_t operations are performed atomically, which is
not required for most hotpath page statistics operations since proper
locks are already held.
What is wanted for these cases are simple inc/dec (non-atomic)
instructions, which is what Nick's patch does by introducing
__mod_page_state.
Ben, have you tested mm-page_state-opt.patch? It should get rid of
most "flags" save/restore on stack.
WARNING: multiple messages have this Message-ID (diff)
From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Benjamin LaHaise <bcrl@kvack.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Nick Piggin <nickpiggin@yahoo.com.au>
Subject: Re: [PATCH] use local_t for page statistics
Date: Fri, 6 Jan 2006 23:00:29 -0200 [thread overview]
Message-ID: <20060107010029.GA5087@dmt.cnet> (raw)
In-Reply-To: <20060106163313.38c08e37.akpm@osdl.org>
On Fri, Jan 06, 2006 at 04:33:13PM -0800, Andrew Morton wrote:
> Benjamin LaHaise <bcrl@kvack.org> wrote:
> >
> > The patch below converts the mm page_states counters to use local_t.
> > mod_page_state shows up in a few profiles on x86 and x86-64 due to the
> > disable/enable interrupts operations touching the flags register. On
> > both my laptop (Pentium M) and P4 test box this results in about 10
> > additional /bin/bash -c exit 0 executions per second (P4 went from ~759/s
> > to ~771/s). Tested on x86 and x86-64. Oh, also add a pgcow statistic
> > for the number of COW page faults.
>
> Bah. I think this is a better approach than the just-merged
> mm-page_state-opt.patch, so I should revert that patch first?
Don't think so - local_t operations are performed atomically, which is
not required for most hotpath page statistics operations since proper
locks are already held.
What is wanted for these cases are simple inc/dec (non-atomic)
instructions, which is what Nick's patch does by introducing
__mod_page_state.
Ben, have you tested mm-page_state-opt.patch? It should get rid of
most "flags" save/restore on stack.
--
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:[~2006-01-08 1:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-06 21:53 [PATCH] use local_t for page statistics Benjamin LaHaise
2006-01-06 21:53 ` Benjamin LaHaise
2006-01-07 0:33 ` Andrew Morton
2006-01-07 0:33 ` Andrew Morton
2006-01-07 1:00 ` Marcelo Tosatti [this message]
2006-01-07 1:00 ` Marcelo Tosatti
2006-01-07 2:52 ` Nick Piggin
2006-01-07 2:52 ` Nick Piggin
2006-01-07 3:01 ` Andi Kleen
2006-01-07 3:01 ` Andi Kleen
2006-01-07 3:19 ` Nick Piggin
2006-01-07 3:19 ` Nick Piggin
2006-01-07 3:25 ` Andi Kleen
2006-01-07 3:25 ` Andi Kleen
2006-01-07 3:48 ` Nick Piggin
2006-01-07 3:48 ` Nick Piggin
2006-01-07 4:03 ` Andi Kleen
2006-01-07 4:03 ` Andi Kleen
2006-01-09 20:54 ` Christoph Lameter
2006-01-09 20:54 ` Christoph Lameter
2006-01-07 3:07 ` Andrew Morton
2006-01-07 3:07 ` Andrew Morton
2006-01-09 18:26 ` Benjamin LaHaise
2006-01-09 18:26 ` Benjamin LaHaise
2006-01-09 20:52 ` Christoph Lameter
2006-01-09 20:52 ` Christoph Lameter
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=20060107010029.GA5087@dmt.cnet \
--to=marcelo.tosatti@cyclades.com \
--cc=akpm@osdl.org \
--cc=bcrl@kvack.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
/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.