aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/mm.h2
-rw-r--r--mm/readahead.c10
2 files changed, 1 insertions, 11 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index fbff8e481cc4..291c4cc06ea7 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1106,8 +1106,6 @@ int write_one_page(struct page *page, int wait);
1106/* readahead.c */ 1106/* readahead.c */
1107#define VM_MAX_READAHEAD 128 /* kbytes */ 1107#define VM_MAX_READAHEAD 128 /* kbytes */
1108#define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */ 1108#define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */
1109#define VM_MAX_CACHE_HIT 256 /* max pages in a row in cache before
1110 * turning readahead off */
1111 1109
1112int do_page_cache_readahead(struct address_space *mapping, struct file *filp, 1110int do_page_cache_readahead(struct address_space *mapping, struct file *filp,
1113 pgoff_t offset, unsigned long nr_to_read); 1111 pgoff_t offset, unsigned long nr_to_read);
diff --git a/mm/readahead.c b/mm/readahead.c
index fd588ffc5086..fc52f9f1b80c 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -22,16 +22,8 @@ void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page)
22} 22}
23EXPORT_SYMBOL(default_unplug_io_fn); 23EXPORT_SYMBOL(default_unplug_io_fn);
24 24
25/*
26 * Convienent macros for min/max read-ahead pages.
27 * Note that MAX_RA_PAGES is rounded down, while MIN_RA_PAGES is rounded up.
28 * The latter is necessary for systems with large page size(i.e. 64k).
29 */
30#define MAX_RA_PAGES (VM_MAX_READAHEAD*1024 / PAGE_CACHE_SIZE)
31#define MIN_RA_PAGES DIV_ROUND_UP(VM_MIN_READAHEAD*1024, PAGE_CACHE_SIZE)
32
33struct backing_dev_info default_backing_dev_info = { 25struct backing_dev_info default_backing_dev_info = {
34 .ra_pages = MAX_RA_PAGES, 26 .ra_pages = VM_MAX_READAHEAD * 1024 / PAGE_CACHE_SIZE,
35 .state = 0, 27 .state = 0,
36 .capabilities = BDI_CAP_MAP_COPY, 28 .capabilities = BDI_CAP_MAP_COPY,
37 .unplug_io_fn = default_unplug_io_fn, 29 .unplug_io_fn = default_unplug_io_fn,