2010-07-07 11:12:45 +00:00
|
|
|
From: Jan Kara <jack@suse.cz>
|
|
|
|
Subject: Update readahead and max_sectors tunables
|
|
|
|
References: bnc#548529
|
|
|
|
Patch-mainline: no
|
|
|
|
|
|
|
|
Increase read_ahead_kb and max_sectors_kb to values from SLES10 SP3 to get
|
|
|
|
back sequential IO performance if we are not compiling a -desktop kernel
|
|
|
|
flavor.
|
|
|
|
|
|
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
|
|
|
|
|
---
|
|
|
|
include/linux/blkdev.h | 4 ++++
|
|
|
|
include/linux/mm.h | 4 ++++
|
|
|
|
2 files changed, 8 insertions(+)
|
|
|
|
|
|
|
|
--- a/include/linux/blkdev.h
|
|
|
|
+++ b/include/linux/blkdev.h
|
2011-04-19 20:09:59 +00:00
|
|
|
@@ -947,7 +947,11 @@ extern int blk_verify_command(unsigned c
|
2010-07-07 11:12:45 +00:00
|
|
|
enum blk_default_limits {
|
|
|
|
BLK_MAX_SEGMENTS = 128,
|
|
|
|
BLK_SAFE_MAX_SECTORS = 255,
|
|
|
|
+#ifndef CONFIG_KERNEL_DESKTOP
|
|
|
|
+ BLK_DEF_MAX_SECTORS = 2048,
|
|
|
|
+#else
|
|
|
|
BLK_DEF_MAX_SECTORS = 1024,
|
|
|
|
+#endif
|
|
|
|
BLK_MAX_SEGMENT_SIZE = 65536,
|
|
|
|
BLK_SEG_BOUNDARY_MASK = 0xFFFFFFFFUL,
|
|
|
|
};
|
|
|
|
--- a/include/linux/mm.h
|
|
|
|
+++ b/include/linux/mm.h
|
2011-04-19 20:09:59 +00:00
|
|
|
@@ -1307,7 +1307,11 @@ int write_one_page(struct page *page, in
|
2010-07-07 11:12:45 +00:00
|
|
|
void task_dirty_inc(struct task_struct *tsk);
|
|
|
|
|
|
|
|
/* readahead.c */
|
|
|
|
+#ifndef CONFIG_KERNEL_DESKTOP
|
|
|
|
+#define VM_MAX_READAHEAD 512 /* kbytes */
|
|
|
|
+#else
|
|
|
|
#define VM_MAX_READAHEAD 128 /* kbytes */
|
|
|
|
+#endif
|
|
|
|
#define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */
|
|
|
|
|
|
|
|
int force_page_cache_readahead(struct address_space *mapping, struct file *filp,
|