From: Fengguang Wu <wfg@mail.ustc.edu.cn>
To: Andrew Morton <akpm@osdl.org>
Cc: Neil Brown <neilb@suse.de>, linux-kernel@vger.kernel.org
Subject: [patch 1/2] readahead sysctl parameters fix
Date: Wed, 29 Nov 2006 19:14:17 +0800 [thread overview]
Message-ID: <364799788.25059@ustc.edu.cn> (raw)
Message-ID: <20061129112948.751104000@intel.ustc.edu.cn> (raw)
In-Reply-To: 20061129111416.430835000@intel.ustc.edu.cn
[-- Attachment #1: readahead-sysctl-parameters-fix.patch --]
[-- Type: text/plain, Size: 1350 bytes --]
- do no extra readahead when (readahead_ratio == 1)
- define readahead_hit_rate inside CONFIG_ADAPTIVE_READAHEAD ifdefs
Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
---
--- linux-2.6.19-rc6-mm1.orig/include/linux/mm.h
+++ linux-2.6.19-rc6-mm1/include/linux/mm.h
@@ -1074,7 +1074,7 @@ extern int readahead_ratio;
static inline int prefer_adaptive_readahead(void)
{
- return readahead_ratio > 1;
+ return readahead_ratio != 1;
}
/* Do stack extension */
--- linux-2.6.19-rc6-mm1.orig/Documentation/sysctl/vm.txt
+++ linux-2.6.19-rc6-mm1/Documentation/sysctl/vm.txt
@@ -234,7 +234,7 @@ plenty of memory(>>2MB per reader), a bi
readahead_ratio also selects the readahead logic:
VALUE CODE PATH
-------------------------------------------
- 0 disable readahead totally
+ 0 read as is, no extra readahead
1 select the stock readahead logic
2-100 select the adaptive readahead logic
--- linux-2.6.19-rc6-mm1.orig/mm/readahead.c
+++ linux-2.6.19-rc6-mm1/mm/readahead.c
@@ -40,10 +40,10 @@
/* Set read-ahead size to ##% of the thrashing-threshold. */
int readahead_ratio = 50;
EXPORT_SYMBOL_GPL(readahead_ratio);
-#endif
/* Readahead as long as cache hit ratio keeps above 1/##. */
int readahead_hit_rate = 0;
+#endif /* CONFIG_ADAPTIVE_READAHEAD */
/*
* Detailed classification of read-ahead behaviors.
--
next prev parent reply other threads:[~2006-11-29 11:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-29 11:14 [patch 0/2] adaptive readahead fixes Fengguang Wu
2006-11-29 11:14 ` Fengguang Wu
2006-11-29 11:14 ` Fengguang Wu [this message]
2006-11-29 11:14 ` [patch 1/2] readahead sysctl parameters fix Fengguang Wu
2006-11-29 11:14 ` [patch 2/2] readahead nfsd case: fix uninitialized ra_min/ra_max Fengguang Wu
2006-11-29 11:14 ` Fengguang Wu
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=364799788.25059@ustc.edu.cn \
--to=wfg@mail.ustc.edu.cn \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
/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.