From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"balbir@linux.vnet.ibm.com" <balbir@linux.vnet.ibm.com>,
lizf@cn.fujitsu.com, a.p.zijlstra@chello.nl
Subject: [-mm] [PATCH 4/4] memcg : radix-tree page_cgroup v2
Date: Thu, 27 Mar 2008 17:51:37 +0900 [thread overview]
Message-ID: <20080327175137.c26b2bb8.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20080327174435.e69f5b45.kamezawa.hiroyu@jp.fujitsu.com>
This 2 prefetches works well under my test.
(*)Tested on x86_64 and ia64 by unixbench/execl.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
mm/memcontrol.c | 5 ++++-
mm/page_cgroup.c | 4 +++-
2 files changed, 7 insertions(+), 2 deletions(-)
Index: linux-2.6.25-rc5-mm1-k/mm/memcontrol.c
===================================================================
--- linux-2.6.25-rc5-mm1-k.orig/mm/memcontrol.c
+++ linux-2.6.25-rc5-mm1-k/mm/memcontrol.c
@@ -182,10 +182,13 @@ static struct mem_cgroup_per_zone *
page_cgroup_zoneinfo(struct page_cgroup *pc)
{
struct mem_cgroup *mem = pc->mem_cgroup;
+ struct mem_cgroup_per_zone *mz;
int nid = page_cgroup_nid(pc);
int zid = page_cgroup_zid(pc);
- return mem_cgroup_zoneinfo(mem, nid, zid);
+ mz = mem_cgroup_zoneinfo(mem, nid, zid);
+ prefetch(mz);
+ return mz;
}
static unsigned long mem_cgroup_get_all_zonestat(struct mem_cgroup *mem,
Index: linux-2.6.25-rc5-mm1-k/mm/page_cgroup.c
===================================================================
--- linux-2.6.25-rc5-mm1-k.orig/mm/page_cgroup.c
+++ linux-2.6.25-rc5-mm1-k/mm/page_cgroup.c
@@ -106,8 +106,10 @@ static struct page_cgroup *pcp_lookup(un
int hnum = hashfunc(idx);
pcp = &get_cpu_var(pcpu_pcgroup_cache);
- if (pcp->ents[hnum].idx == idx && pcp->ents[hnum].base)
+ if (pcp->ents[hnum].idx == idx && pcp->ents[hnum].base) {
ret = pcp->ents[hnum].base + pfn;
+ prefetch(ret);
+ }
put_cpu_var(pcpu_pcgroup_cache);
return ret;
}
--
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:[~2008-03-27 8:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 8:44 [-mm] [PATCH 0/4] " KAMEZAWA Hiroyuki
2008-03-27 8:47 ` [-mm] [PATCH 1/4] memcg : radix-tree page_cgroup KAMEZAWA Hiroyuki
2008-03-28 0:55 ` Li Zefan
2008-03-28 1:13 ` KAMEZAWA Hiroyuki
2008-03-27 8:49 ` [-mm] [PATCH 2/4] memcg: boost by percpu KAMEZAWA Hiroyuki
2008-03-27 8:50 ` [-mm] [PATCH 3/4] memcg : shirink page cgroup KAMEZAWA Hiroyuki
2008-03-27 8:51 ` KAMEZAWA Hiroyuki [this message]
2008-03-27 8:53 ` [-mm] [PATCH 4/4] memcg : radix-tree page_cgroup v2 KAMEZAWA Hiroyuki
2008-03-27 9:12 ` [-mm] [PATCH 0/4] " KOSAKI Motohiro
2008-03-27 9:34 ` KAMEZAWA Hiroyuki
2008-03-27 9:53 ` Balbir Singh
2008-03-27 10:19 ` KAMEZAWA Hiroyuki
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=20080327175137.c26b2bb8.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=a.p.zijlstra@chello.nl \
--cc=balbir@linux.vnet.ibm.com \
--cc=linux-mm@kvack.org \
--cc=lizf@cn.fujitsu.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