aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-06-16 18:31:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 22:47:29 -0400
commitd30a11004e3411909f2448546f036a011978062e (patch)
treec1980adb410d9fabd2c2eb8af9f0ed8ee4b656da /include/linux/mm.h
parent2fad6f5deee5556f511eab58da78737a23ddb35d (diff)
readahead: record mmap read-around states in file_ra_state
Mmap read-around now shares the same code style and data structure with readahead code. This also removes do_page_cache_readahead(). Its last user, mmap read-around, has been changed to call ra_submit(). The no-readahead-if-congested logic is dumped by the way. Users will be pretty sensitive about the slow loading of executables. So it's unfavorable to disabled mmap read-around on a congested queue. [akpm@linux-foundation.org: coding-style fixes] Cc: Nick Piggin <npiggin@suse.de> Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn> Cc: Ying Han <yinghan@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index ad613ed66ab0..33da7f538841 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1178,8 +1178,6 @@ void task_dirty_inc(struct task_struct *tsk);
1178#define VM_MAX_READAHEAD 128 /* kbytes */ 1178#define VM_MAX_READAHEAD 128 /* kbytes */
1179#define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */ 1179#define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */
1180 1180
1181int do_page_cache_readahead(struct address_space *mapping, struct file *filp,
1182 pgoff_t offset, unsigned long nr_to_read);
1183int force_page_cache_readahead(struct address_space *mapping, struct file *filp, 1181int force_page_cache_readahead(struct address_space *mapping, struct file *filp,
1184 pgoff_t offset, unsigned long nr_to_read); 1182 pgoff_t offset, unsigned long nr_to_read);
1185 1183
@@ -1197,6 +1195,9 @@ void page_cache_async_readahead(struct address_space *mapping,
1197 unsigned long size); 1195 unsigned long size);
1198 1196
1199unsigned long max_sane_readahead(unsigned long nr); 1197unsigned long max_sane_readahead(unsigned long nr);
1198unsigned long ra_submit(struct file_ra_state *ra,
1199 struct address_space *mapping,
1200 struct file *filp);
1200 1201
1201/* Do stack extension */ 1202/* Do stack extension */
1202extern int expand_stack(struct vm_area_struct *vma, unsigned long address); 1203extern int expand_stack(struct vm_area_struct *vma, unsigned long address);