From: Fengguang Wu <wfg@mail.ustc.edu.cn>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Steven Pratt <slpratt@austin.ibm.com>
Cc: Ram Pai <linuxram@us.ibm.com>
Subject: [PATCH 1/9] readahead: introduce PG_readahead
Date: Thu, 17 May 2007 06:47:53 +0800 [thread overview]
Message-ID: <379355695.83536@ustc.edu.cn> (raw)
Message-ID: <20070516224818.246719596@mail.ustc.edu.cn> (raw)
In-Reply-To: 20070516224752.500812933@mail.ustc.edu.cn
[-- Attachment #1: mm-introduce-pg_readahead.patch --]
[-- Type: text/plain, Size: 1907 bytes --]
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>
---
include/linux/page-flags.h | 5 +++++
mm/page_alloc.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
--- linux-2.6.22-rc1-mm1.orig/include/linux/page-flags.h
+++ linux-2.6.22-rc1-mm1/include/linux/page-flags.h
@@ -92,6 +92,7 @@
#define PG_lazyfree 20 /* MADV_FREE potential throwaway */
#define PG_booked 21 /* Has blocks reserved on-disk */
+#define PG_readahead 22 /* Reminder to do async read-ahead */
/* PG_owner_priv_1 users should have descriptive aliases */
#define PG_checked PG_owner_priv_1 /* Used by some filesystems */
@@ -206,6 +207,10 @@ static inline void SetPageUptodate(struc
#define SetPageBooked(page) set_bit(PG_booked, &(page)->flags)
#define ClearPageBooked(page) clear_bit(PG_booked, &(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)
--- linux-2.6.22-rc1-mm1.orig/mm/page_alloc.c
+++ linux-2.6.22-rc1-mm1/mm/page_alloc.c
@@ -659,7 +659,7 @@ static int prep_new_page(struct page *pa
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);
--
next prev parent reply other threads:[~2007-05-16 22:50 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-16 22:47 [PATCH 0/9] on-demand readahead Fengguang Wu
2007-05-16 22:47 ` Fengguang Wu
2007-05-16 22:47 ` Fengguang Wu [this message]
2007-05-16 22:47 ` [PATCH 1/9] readahead: introduce PG_readahead Fengguang Wu
2007-05-19 6:28 ` Andrew Morton
2007-05-19 11:35 ` Andi Kleen
2007-05-19 15:19 ` Andrew Morton
2007-05-19 12:30 ` Fengguang Wu
2007-05-19 12:30 ` Fengguang Wu
2007-05-19 15:25 ` Andrew Morton
2007-05-20 3:09 ` Fengguang Wu
2007-05-20 3:09 ` Fengguang Wu
2007-05-20 7:10 ` Christoph Lameter
2007-06-12 1:04 ` Rusty Russell
2007-06-12 2:52 ` Fengguang Wu
2007-06-12 2:52 ` Fengguang Wu
2007-05-16 22:47 ` [PATCH 2/9] readahead: add look-ahead support to __do_page_cache_readahead() Fengguang Wu
2007-05-16 22:47 ` Fengguang Wu
2007-05-16 22:47 ` [PATCH 3/9] readahead: MIN_RA_PAGES/MAX_RA_PAGES macros Fengguang Wu
2007-05-16 22:47 ` Fengguang Wu
2007-05-16 22:47 ` [PATCH 4/9] readahead: data structure and routines Fengguang Wu
2007-05-16 22:47 ` Fengguang Wu
2007-06-12 3:30 ` Rusty Russell
2007-06-12 12:07 ` Fengguang Wu
2007-06-12 12:07 ` Fengguang Wu
2007-06-13 0:27 ` Rusty Russell
2007-06-13 3:07 ` Fengguang Wu
2007-06-13 3:07 ` Fengguang Wu
2007-05-16 22:47 ` [PATCH 5/9] readahead: on-demand readahead logic Fengguang Wu
2007-05-16 22:47 ` Fengguang Wu
2007-05-19 6:23 ` Andrew Morton
2007-05-19 13:02 ` Fengguang Wu
2007-05-19 13:02 ` Fengguang Wu
2007-06-12 4:36 ` Rusty Russell
2007-06-12 10:35 ` Fengguang Wu
2007-06-12 10:35 ` Fengguang Wu
2007-06-13 1:40 ` Rusty Russell
2007-06-13 4:00 ` Fengguang Wu
2007-06-13 4:00 ` Fengguang Wu
2007-06-13 5:51 ` Rusty Russell
2007-06-13 7:07 ` Fengguang Wu
2007-06-13 7:07 ` Fengguang Wu
2007-05-16 22:47 ` [PATCH 6/9] readahead: convert filemap invocations Fengguang Wu
2007-05-16 22:47 ` Fengguang Wu
2007-05-16 22:47 ` [PATCH 7/9] readahead: convert splice invocations Fengguang Wu
2007-05-16 22:47 ` Fengguang Wu
2007-05-16 22:48 ` [PATCH 8/9] readahead: convert ext3/ext4 invocations Fengguang Wu
2007-05-16 22:48 ` Fengguang Wu
2007-05-19 12:19 ` Andi Kleen
2007-05-16 22:48 ` [PATCH 9/9] readahead: remove the old algorithm Fengguang Wu
2007-05-16 22:48 ` Fengguang Wu
2007-05-19 12:18 ` Andi Kleen
2007-05-19 13:17 ` Fengguang Wu
2007-05-19 13:17 ` Fengguang Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=379355695.83536@ustc.edu.cn \
--to=wfg@mail.ustc.edu.cn \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.