From: Fengguang Wu <wfg@mail.ustc.edu.cn>
To: Andrew Morton <akpm@osdl.org>
Cc: Valdis.Kletnieks@vt.edu, diegocg@gmail.com, lista1@comhem.se,
linux-kernel@vger.kernel.org
Subject: [PATCH] readahead: call scheme - fix fastcall readahead_cache_hit()
Date: Sun, 4 Jun 2006 20:13:28 +0800 [thread overview]
Message-ID: <349423197.27188@ustc.edu.cn> (raw)
Message-ID: <20060604121328.GA6686@mail.ustc.edu.cn> (raw)
In-Reply-To: <20060604020738.31f43cb0.akpm@osdl.org>
Remove 'fastcall' directive for readahead_cache_hit().
Sorry, it also leads to unfavorable performance in the following micro
benchmark on i386 with CONFIG_REGPARM=n:
Command:
time cp cold /dev/null
Summary:
user sys cpu total
no-fastcall 1.24 24.88 90.9 28.57
fastcall 1.16 25.69 91.5 29.23
Details:
without fastcall:
cp cold /dev/null 1.27s user 24.63s system 91% cpu 28.348 total
cp cold /dev/null 1.17s user 25.09s system 91% cpu 28.653 total
cp cold /dev/null 1.24s user 24.75s system 91% cpu 28.448 total
cp cold /dev/null 1.20s user 25.04s system 91% cpu 28.614 total
cp cold /dev/null 1.31s user 24.67s system 91% cpu 28.499 total
cp cold /dev/null 1.30s user 24.87s system 91% cpu 28.530 total
cp cold /dev/null 1.26s user 24.84s system 91% cpu 28.542 total
cp cold /dev/null 1.16s user 25.15s system 90% cpu 28.925 total
with fastcall:
cp cold /dev/null 1.16s user 26.39s system 91% cpu 30.061 total
cp cold /dev/null 1.25s user 26.53s system 91% cpu 30.378 total
cp cold /dev/null 1.10s user 25.32s system 92% cpu 28.679 total
cp cold /dev/null 1.15s user 25.20s system 91% cpu 28.747 total
cp cold /dev/null 1.19s user 25.38s system 92% cpu 28.841 total
cp cold /dev/null 1.11s user 25.75s system 92% cpu 29.126 total
cp cold /dev/null 1.17s user 25.49s system 91% cpu 29.042 total
cp cold /dev/null 1.17s user 25.49s system 92% cpu 28.970 total
Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn>
---
--- linux-2.6.17-rc5-mm2.orig/include/linux/mm.h
+++ linux-2.6.17-rc5-mm2/include/linux/mm.h
@@ -1074,7 +1074,7 @@ page_cache_readahead_adaptive(struct add
struct file_ra_state *ra, struct file *filp,
struct page *prev_page, struct page *page,
pgoff_t first_index, pgoff_t index, pgoff_t last_index);
-void fastcall readahead_cache_hit(struct file_ra_state *ra, struct page *page);
+void readahead_cache_hit(struct file_ra_state *ra, struct page *page);
#ifdef CONFIG_ADAPTIVE_READAHEAD
extern int readahead_ratio;
--- linux-2.6.17-rc5-mm2.orig/mm/readahead.c
+++ linux-2.6.17-rc5-mm2/mm/readahead.c
@@ -1916,7 +1916,7 @@ readit:
* readahead_cache_hit() is the feedback route of the adaptive read-ahead
* logic. It must be called on every access on the read-ahead pages.
*/
-void fastcall readahead_cache_hit(struct file_ra_state *ra, struct page *page)
+void readahead_cache_hit(struct file_ra_state *ra, struct page *page)
{
if (PageActive(page) || PageReferenced(page))
return;
next prev parent reply other threads:[~2006-06-04 12:13 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-04 7:34 [PATCH] readahead: initial method - expected read size - fix fastcall Fengguang Wu
2006-06-04 7:34 ` Fengguang Wu
2006-06-04 9:07 ` Andrew Morton
2006-06-04 9:25 ` Arjan van de Ven
2006-06-05 1:17 ` Voluspa
2006-06-05 8:00 ` Arjan van de Ven
2006-06-06 2:26 ` Fengguang Wu
2006-06-06 2:26 ` Fengguang Wu
2006-06-08 7:31 ` Voluspa
2006-06-08 7:57 ` Fengguang Wu
2006-06-08 7:57 ` Fengguang Wu
2006-06-06 2:57 ` Fengguang Wu
2006-06-06 2:57 ` Fengguang Wu
2006-06-08 7:43 ` Voluspa
2006-06-08 8:13 ` Fengguang Wu
2006-06-08 8:13 ` Fengguang Wu
2006-06-08 8:28 ` Voluspa
2006-06-08 8:50 ` Fengguang Wu
2006-06-08 8:50 ` Fengguang Wu
2006-06-08 10:04 ` Voluspa
2006-06-04 12:13 ` Fengguang Wu [this message]
2006-06-04 12:13 ` [PATCH] readahead: call scheme - fix fastcall readahead_cache_hit() Fengguang Wu
-- strict thread matches above, loose matches on Subject: below --
2006-05-30 3:36 Adaptive Readahead V14 - statistics question Voluspa
2006-05-30 6:40 ` Wu Fengguang
2006-05-30 6:40 ` Wu Fengguang
2006-05-30 16:49 ` Valdis.Kletnieks
2006-05-31 21:06 ` Diego Calleja
2006-05-31 21:50 ` Voluspa
2006-06-01 5:51 ` Fengguang Wu
2006-06-01 5:51 ` Fengguang Wu
2006-06-01 6:35 ` Voluspa
2006-06-08 8:04 ` Voluspa
2006-06-08 11:37 ` adaptive readahead overheads Fengguang Wu
2006-06-08 11:37 ` Fengguang Wu
2006-06-08 12:25 ` Voluspa
2006-06-08 12:39 ` Fengguang Wu
2006-06-08 12:39 ` Fengguang Wu
2006-06-08 13:05 ` Andi Kleen
2006-06-08 14:00 ` Jens Axboe
[not found] ` <448493E9.9030203@samwel.tk>
2006-06-06 3:34 ` Adaptive Readahead V14 - statistics question Wu Fengguang
2006-06-06 3:34 ` Wu Fengguang
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=349423197.27188@ustc.edu.cn \
--to=wfg@mail.ustc.edu.cn \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@osdl.org \
--cc=diegocg@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lista1@comhem.se \
/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.