From: Christoph Lameter <clameter@engr.sgi.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Andrew Morton <akpm@osdl.org>,
marcelo.tosatti@cyclades.com, linux-mm@kvack.org
Subject: Re: Get rid of scan_control
Date: Sat, 11 Feb 2006 20:41:10 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.62.0602112036350.25872@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <43EEB4DA.6030501@yahoo.com.au>
On Sun, 12 Feb 2006, Nick Piggin wrote:
> > Could we at least pass the number of pages reclaimed back as the return
> > value of the functions? I believe most of the savings that Andrew saw was
> > due to the number of reclaimed pages being processed directly in registers.
>
> What savings are you interested in, exactly? Your initial patch
> would definitely have slowed down page reclaim on big systems
> due to the read_page_state...
The patch that put the whole calculation into a separate block that
is only executed for the swap case would have taken care of that.
> I think most of the cost apart from locking (because that will
> depend on contention) is hitting random cachelines of struct pages
> then hitting random radix tree cachelines to remove them. Not
> much you can do about that.
>
> That said I'm never against microoptimisations provided they
> weigh in on the right side of the (subjective) complexity /
> improvement ratio.
Its a bit strange if you call a function and then access a structure
member to get the result. Locating parameter in a structure makes it
impossible to see what is passed to a function when it is
called.
It is also something that will make it difficult for compilers to do
a good job. Flow control is easier to optimize for a local variable
than for a pointer into a struct that may have been modified elsewhere.
--
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-02-12 4:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-10 5:02 Christoph Lameter
2006-02-11 4:53 ` Marcelo Tosatti
2006-02-11 9:32 ` Andrew Morton
2006-02-11 9:46 ` Andrew Morton
2006-02-12 3:33 ` Nick Piggin
2006-02-12 3:47 ` Christoph Lameter
2006-02-12 4:08 ` Nick Piggin
2006-02-12 4:41 ` Christoph Lameter [this message]
2006-02-12 5:01 ` Nick Piggin
2006-02-12 5:14 ` Andrew Morton
2006-02-12 5:37 ` Andrew Morton
2006-02-12 6:49 ` Christoph Lameter
2006-02-12 7:53 ` Andrew Morton
2006-02-13 17:54 ` Christoph Lameter
2006-02-12 6:25 ` Christoph Lameter
2006-02-11 19:01 ` Christoph Lameter
2006-02-11 21:13 ` Andrew Morton
2006-02-11 21:27 ` 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=Pine.LNX.4.62.0602112036350.25872@schroedinger.engr.sgi.com \
--to=clameter@engr.sgi.com \
--cc=akpm@osdl.org \
--cc=linux-mm@kvack.org \
--cc=marcelo.tosatti@cyclades.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox