Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d77c2d7cc5126639a47d73300b40d461f2811a0f
Commit:     d77c2d7cc5126639a47d73300b40d461f2811a0f
Parent:     2ba2d00363975242dee9bb22cf798b487e3cd61e
Author:     Fengguang Wu <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 19 01:47:55 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Jul 19 10:04:43 2007 -0700

    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 <[EMAIL PROTECTED]>
    Cc: Steven Pratt <[EMAIL PROTECTED]>
    Cc: Ram Pai <[EMAIL PROTECTED]>
    Cc: Rusty Russell <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/page-flags.h |    5 +++++
 mm/page_alloc.c            |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 731cd2a..709d92f 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -83,6 +83,7 @@
 #define PG_private             11      /* If pagecache, has fs-private data */
 
 #define PG_writeback           12      /* Page is under writeback */
+#define PG_readahead           13      /* Reminder to do async read-ahead */
 #define PG_compound            14      /* Part of a compound page */
 #define PG_swapcache           15      /* Swap page: swp_entry_t in private */
 
@@ -226,6 +227,10 @@ static inline void SetPageUptodate(struct page *page)
 #define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags)
 #define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags)
 
+#define PageReadahead(page)    test_bit(PG_readahead, &(page)->flags)
+#define SetPageReadahead(page) set_bit(PG_readahead, &(page)->flags)
+#define ClearPageReadahead(page) clear_bit(PG_readahead, &(page)->flags)
+
 #define PageReclaim(page)      test_bit(PG_reclaim, &(page)->flags)
 #define SetPageReclaim(page)   set_bit(PG_reclaim, &(page)->flags)
 #define ClearPageReclaim(page) clear_bit(PG_reclaim, &(page)->flags)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e2a10b9..2165be9 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -617,7 +617,7 @@ static int prep_new_page(struct page *page, int order, 
gfp_t gfp_flags)
        if (PageReserved(page))
                return 1;
 
-       page->flags &= ~(1 << PG_uptodate | 1 << PG_error |
+       page->flags &= ~(1 << PG_uptodate | 1 << PG_error | 1 << PG_readahead |
                        1 << PG_referenced | 1 << PG_arch_1 |
                        1 << PG_owner_priv_1 | 1 << PG_mappedtodisk);
        set_page_private(page, 0);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to