diff options
author | Fengguang Wu <wfg@mail.ustc.edu.cn> | 2007-07-19 04:47:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 13:04:43 -0400 |
commit | d77c2d7cc5126639a47d73300b40d461f2811a0f (patch) | |
tree | d02b32ca92fde9a04be9bee0f0b7c8961479448c /include/linux/page-flags.h | |
parent | 2ba2d00363975242dee9bb22cf798b487e3cd61e (diff) |
readahead: introduce PG_readahead
Introduce a new page flag: PG_readahead.
It acts as a look-ahead mark, which tells the page reader: Hey, it's time to
invoke the read-ahead logic. For the sake of I/O pipelining, don't wait until
it runs out of cached pages!
Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
Cc: Steven Pratt <slpratt@austin.ibm.com>
Cc: Ram Pai <linuxram@us.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/page-flags.h')
-rw-r--r-- | include/linux/page-flags.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 731cd2ac3227..709d92fd2877 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -83,6 +83,7 @@ | |||
83 | #define PG_private 11 /* If pagecache, has fs-private data */ | 83 | #define PG_private 11 /* If pagecache, has fs-private data */ |
84 | 84 | ||
85 | #define PG_writeback 12 /* Page is under writeback */ | 85 | #define PG_writeback 12 /* Page is under writeback */ |
86 | #define PG_readahead 13 /* Reminder to do async read-ahead */ | ||
86 | #define PG_compound 14 /* Part of a compound page */ | 87 | #define PG_compound 14 /* Part of a compound page */ |
87 | #define PG_swapcache 15 /* Swap page: swp_entry_t in private */ | 88 | #define PG_swapcache 15 /* Swap page: swp_entry_t in private */ |
88 | 89 | ||
@@ -226,6 +227,10 @@ static inline void SetPageUptodate(struct page *page) | |||
226 | #define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags) | 227 | #define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags) |
227 | #define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags) | 228 | #define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags) |
228 | 229 | ||
230 | #define PageReadahead(page) test_bit(PG_readahead, &(page)->flags) | ||
231 | #define SetPageReadahead(page) set_bit(PG_readahead, &(page)->flags) | ||
232 | #define ClearPageReadahead(page) clear_bit(PG_readahead, &(page)->flags) | ||
233 | |||
229 | #define PageReclaim(page) test_bit(PG_reclaim, &(page)->flags) | 234 | #define PageReclaim(page) test_bit(PG_reclaim, &(page)->flags) |
230 | #define SetPageReclaim(page) set_bit(PG_reclaim, &(page)->flags) | 235 | #define SetPageReclaim(page) set_bit(PG_reclaim, &(page)->flags) |
231 | #define ClearPageReclaim(page) clear_bit(PG_reclaim, &(page)->flags) | 236 | #define ClearPageReclaim(page) clear_bit(PG_reclaim, &(page)->flags) |