From: Fengguang Wu <wfg@mail.ustc.edu.cn>
To: Jens Axboe <axboe@suse.de>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Lubos Lunak <l.lunak@suse.cz>,
Wu Fengguang <wfg@mail.ustc.edu.cn>
Subject: [PATCH 4/7] iosched: submit READA requests on possible readahead code path
Date: Sat, 24 Jun 2006 16:20:10 +0800 [thread overview]
Message-ID: <351137382.24594@ustc.edu.cn> (raw)
Message-ID: <20060624082311.501730089@localhost.localdomain> (raw)
In-Reply-To: 20060624082006.574472632@localhost.localdomain
[-- Attachment #1: iosched-submit-reada-on-possible-readahead-path.patch --]
[-- Type: text/plain, Size: 2119 bytes --]
Change the request type from READ to READA in possible readahead code paths.
- call mpage_bio_submit(READA) in mpage_readpages()
- call submit_bio(READA) in swap_readpage()
Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn>
---
fs/mpage.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
--- linux-2.6.17-mm1.orig/fs/mpage.c
+++ linux-2.6.17-mm1/fs/mpage.c
@@ -302,7 +302,7 @@ do_mpage_readpage(struct bio *bio, struc
* This page will go to BIO. Do we need to send this BIO off first?
*/
if (bio && (*last_block_in_bio != blocks[0] - 1))
- bio = mpage_bio_submit(READ, bio);
+ bio = mpage_bio_submit(READA, bio);
alloc_new:
if (bio == NULL) {
@@ -315,12 +315,12 @@ alloc_new:
length = first_hole << blkbits;
if (bio_add_page(bio, page, length, 0) < length) {
- bio = mpage_bio_submit(READ, bio);
+ bio = mpage_bio_submit(READA, bio);
goto alloc_new;
}
if (buffer_boundary(map_bh) || (first_hole != blocks_per_page))
- bio = mpage_bio_submit(READ, bio);
+ bio = mpage_bio_submit(READA, bio);
else
*last_block_in_bio = blocks[blocks_per_page - 1];
out:
@@ -328,7 +328,7 @@ out:
confused:
if (bio)
- bio = mpage_bio_submit(READ, bio);
+ bio = mpage_bio_submit(READA, bio);
if (!PageUptodate(page))
block_read_full_page(page, get_block);
else
@@ -418,7 +418,7 @@ mpage_readpages(struct address_space *ma
pagevec_lru_add(&lru_pvec);
BUG_ON(!list_empty(pages));
if (bio)
- mpage_bio_submit(READ, bio);
+ mpage_bio_submit(READA, bio);
return 0;
}
EXPORT_SYMBOL(mpage_readpages);
@@ -437,7 +437,7 @@ int mpage_readpage(struct page *page, ge
bio = do_mpage_readpage(bio, page, 1, &last_block_in_bio,
&map_bh, &first_logical_block, get_block);
if (bio)
- mpage_bio_submit(READ, bio);
+ mpage_bio_submit(READA, bio);
return 0;
}
EXPORT_SYMBOL(mpage_readpage);
--- linux-2.6.17-mm1.orig/mm/page_io.c
+++ linux-2.6.17-mm1/mm/page_io.c
@@ -124,7 +124,7 @@ int swap_readpage(struct file *file, str
goto out;
}
inc_page_state(pswpin);
- submit_bio(READ, bio);
+ submit_bio(READA, bio);
out:
return ret;
}
--
next prev parent reply other threads:[~2006-06-24 8:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-24 8:20 [PATCH 0/7] [RFC] iosched: make a difference between read/readahead requests Fengguang Wu
2006-06-24 8:20 ` Fengguang Wu
2006-06-24 8:20 ` [PATCH 1/7] iosched: introduce WRITEA Fengguang Wu
2006-06-24 8:20 ` Fengguang Wu
2006-06-24 8:20 ` Fengguang Wu [this message]
2006-06-24 8:20 ` [PATCH 4/7] iosched: submit READA requests on possible readahead code path Fengguang Wu
2006-06-24 8:20 ` [PATCH 5/7] iosched: introduce elv_kick_page() Fengguang Wu
2006-06-24 8:20 ` Fengguang Wu
2006-06-24 8:20 ` [PATCH 7/7] iosched: introduce deadline_kick_page() Fengguang Wu
2006-06-24 8:20 ` Fengguang Wu
2006-06-24 11:01 ` Jens Axboe
2006-06-25 6:32 ` Fengguang Wu
2006-06-25 6:32 ` Fengguang Wu
2006-06-28 11:27 ` Jens Axboe
2006-07-04 1:32 ` Fengguang Wu
2006-07-04 1:32 ` Fengguang Wu
-- strict thread matches above, loose matches on Subject: below --
2006-06-24 2:03 [PATCH 0/7] [RFC] iosched: make a difference between read/readahead requests Fengguang Wu
2006-06-24 2:04 ` [PATCH 4/7] iosched: submit READA requests on possible readahead code path Fengguang Wu
2006-06-24 2:04 ` 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=351137382.24594@ustc.edu.cn \
--to=wfg@mail.ustc.edu.cn \
--cc=akpm@osdl.org \
--cc=axboe@suse.de \
--cc=l.lunak@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/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.