From: Christoph Lameter <clameter@sgi.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: riel@redhat.com, akpm@linux-foundation.org, mbligh@mbligh.org,
linux-mm@kvack.org, nickpiggin@yahoo.com.au,
a.p.zijlstra@chello.nl
Subject: Re: [RFC] Remove unswappable anonymous pages off the LRU
Date: Thu, 15 Feb 2007 21:19:01 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0702152102580.2290@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20070216135714.669701b4.kamezawa.hiroyu@jp.fujitsu.com>
On Fri, 16 Feb 2007, KAMEZAWA Hiroyuki wrote:
> > On 64 bit platforms we can add one unsigned long to get from 56 to 64
> > bytes.
> >
>
> I sometimes dreams
> ==
> struct page {
> ...
> struct zone *zone;
> ...
> };
> #define page_zone(page) (page)->zone
> ==
> but never tried ;)
Hmmm..... Currently we have
static inline struct zone *page_zone(struct page *page)
{
return &NODE_DATA(page_to_nid(page))->node_zones[page_zonenum(page)];
}
page_to_nid is extracting a piece of the page flags. Then we need to do a
lookup and find the zonenum (another extract from page flags).
This is not expensive. Look at __pagevec_lru_add. This boils down to (r9
= struct page * ):
0xa000000100117ef0 <__pagevec_lru_add+80>: [MMI] ld8 r33=[r9];;
0xa000000100117ef1 <__pagevec_lru_add+81>: ld8 r8=[r33]
0xa000000100117ef2 <__pagevec_lru_add+82>: nop.i 0x0;;
0xa000000100117f00 <__pagevec_lru_add+96>: [MII] nop.m 0x0
0xa000000100117f01 <__pagevec_lru_add+97>: shr.u r3=r8,54;;
0xa000000100117f02 <__pagevec_lru_add+98>: nop.i 0x0
0xa000000100117f10 <__pagevec_lru_add+112>: [MMI] shladd r14=r3,3,r15;;
0xa000000100117f11 <__pagevec_lru_add+113>: ld8 r34=[r14]
0xa000000100117f12 <__pagevec_lru_add+114>: nop.i 0x0;;
0xa000000100117f20 <__pagevec_lru_add+128>: [MIB] nop.m 0x0
0xa000000100117f21 <__pagevec_lru_add+129>: cmp.eq p6,p7=r2,r34
--
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-02-16 5:19 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-15 21:05 [RFC] Remove unswappable anonymous pages off the LRU Christoph Lameter
2007-02-15 22:31 ` Rik van Riel
2007-02-15 22:41 ` Christoph Lameter
2007-02-15 22:50 ` Rik van Riel
2007-02-15 22:53 ` Christoph Lameter
2007-02-15 23:19 ` Andrew Morton
2007-02-15 23:20 ` Lee Schermerhorn
2007-02-16 0:15 ` Andrew Morton
2007-02-16 1:13 ` Andrew Morton
2007-02-16 1:24 ` KAMEZAWA Hiroyuki
2007-02-16 1:40 ` Martin Bligh
2007-02-16 1:49 ` Andrew Morton
2007-02-16 2:21 ` Martin Bligh
2007-02-16 2:34 ` Christoph Lameter
2007-02-16 2:48 ` Andrew Morton
2007-02-16 2:50 ` Christoph Lameter
2007-02-16 3:18 ` Andrew Morton
2007-02-16 3:36 ` Christoph Lameter
2007-02-16 3:42 ` Andrew Morton
2007-02-16 3:50 ` Christoph Lameter
2007-02-16 4:02 ` Andrew Morton
2007-02-16 4:07 ` Christoph Lameter
2007-02-16 4:03 ` Andrew Morton
2007-02-16 4:14 ` Rik van Riel
2007-02-16 4:15 ` Christoph Lameter
2007-02-16 4:57 ` KAMEZAWA Hiroyuki
2007-02-16 5:16 ` Andrew Morton
2007-02-16 5:25 ` Christoph Lameter
2007-02-16 5:41 ` Andrew Morton
2007-02-16 5:19 ` Christoph Lameter [this message]
2007-02-16 4:24 ` Andrew Morton
2007-02-16 8:15 ` Peter Zijlstra
2007-02-16 9:11 ` Rafael J. Wysocki
2007-02-16 9:19 ` Peter Zijlstra
2007-02-16 10:10 ` Christoph Lameter
2007-02-16 10:17 ` Peter Zijlstra
2007-02-16 11:04 ` Rafael J. Wysocki
2007-02-16 2:16 ` Christoph Lameter
2007-02-16 3:17 ` Martin Bligh
2007-02-16 3:29 ` Christoph Lameter
2007-02-16 8:10 ` Peter Zijlstra
2007-02-16 2:15 ` Christoph Lameter
2007-02-16 2:55 ` Christoph Lameter
2007-02-16 5:02 ` 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.64.0702152102580.2290@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=mbligh@mbligh.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 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).