From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: cl@linux-foundation.org
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: [RFC MM] speculative page fault
Date: Fri, 13 Nov 2009 16:35:44 +0900 [thread overview]
Message-ID: <20091113163544.d92561c7.kamezawa.hiroyu@jp.fujitsu.com> (raw)
This is just a toy patch inspied by on Christoph's mmap_sem works.
Only for my hobby, now.
Not well tested. So please look into only if you have time.
My multi-thread page fault test program shows some improvement.
But I doubt my test ;) Do you have recommended benchmarks for parallel page-faults ?
Counting # of page faults per 60sec. See page-faults. bigger is better.
Test on x86-64 8cpus.
[Before]
474441.541914 task-clock-msecs # 7.906 CPUs
10318 context-switches # 0.000 M/sec
10 CPU-migrations # 0.000 M/sec
15816787 page-faults # 0.033 M/sec
1485219138381 cycles # 3130.458 M/sec (scaled from 69.99%)
295669524399 instructions # 0.199 IPC (scaled from 79.98%)
57658291915 branches # 121.529 M/sec (scaled from 79.98%)
798567455 branch-misses # 1.385 % (scaled from 79.98%)
2458780947 cache-references # 5.182 M/sec (scaled from 20.02%)
844605496 cache-misses # 1.780 M/sec (scaled from 20.02%)
[After]
471166.582784 task-clock-msecs # 7.852 CPUs
10378 context-switches # 0.000 M/sec
10 CPU-migrations # 0.000 M/sec
37950235 page-faults # 0.081 M/sec
1463000664470 cycles # 3105.060 M/sec (scaled from 70.32%)
346531590054 instructions # 0.237 IPC (scaled from 80.20%)
63309364882 branches # 134.367 M/sec (scaled from 80.19%)
448256258 branch-misses # 0.708 % (scaled from 80.20%)
2601112130 cache-references # 5.521 M/sec (scaled from 19.81%)
872978619 cache-misses # 1.853 M/sec (scaled from 19.80%)
Main concept of this patch is
- Do page fault without taking mm->mmap_sem until some modification in vma happens.
- All page fault via get_user_pages() should have to take mmap_sem.
- find_vma()/rb_tree must be walked under proper locks. For avoiding that, use
per-thread cache.
It seems I don't have enough time to update this, more.
So, I dump patches here just for share.
Thanks,
-Kame
--
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 reply other threads:[~2009-11-13 7:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-13 7:35 KAMEZAWA Hiroyuki [this message]
2009-11-13 7:37 ` [RFC MM 1/4] mm accessor (updated) KAMEZAWA Hiroyuki
2009-11-13 7:38 ` [RFC MM 2/4] refcnt for vm_area_struct KAMEZAWA Hiroyuki
2009-11-13 7:40 ` [RFC MM 3/4] add mm version number KAMEZAWA Hiroyuki
2009-11-13 15:27 ` Minchan Kim
2009-11-13 16:26 ` KAMEZAWA Hiroyuki
2009-11-13 7:41 ` [RFC MM 4/4] speculative page fault KAMEZAWA Hiroyuki
2009-11-13 15:59 ` Minchan Kim
2009-11-13 16:28 ` KAMEZAWA Hiroyuki
2009-11-13 16:20 ` [RFC MM] " Minchan Kim
2009-11-13 16:38 ` 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=20091113163544.d92561c7.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=cl@linux-foundation.org \
--cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox