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 5/7] iosched: introduce elv_kick_page()
Date: Sat, 24 Jun 2006 16:20:11 +0800 [thread overview]
Message-ID: <351137383.24594@ustc.edu.cn> (raw)
Message-ID: <20060624082311.912265883@localhost.localdomain> (raw)
In-Reply-To: 20060624082006.574472632@localhost.localdomain
[-- Attachment #1: iosched-kick-page-elevator.patch --]
[-- Type: text/plain, Size: 2416 bytes --]
Introduce elv_kick_page() to turn a possibly READA request into READ.
The underlying elevator_kick_page_fn() should also reschedule the request
if necessary.
Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn>
---
block/ll_rw_blk.c | 8 ++++++++
fs/buffer.c | 5 +++--
include/linux/elevator.h | 2 ++
3 files changed, 13 insertions(+), 2 deletions(-)
--- linux-2.6.17-rc5-mm3.orig/include/linux/elevator.h
+++ linux-2.6.17-rc5-mm3/include/linux/elevator.h
@@ -20,6 +20,7 @@ typedef int (elevator_set_req_fn) (reque
typedef void (elevator_put_req_fn) (request_queue_t *, struct request *);
typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *);
typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *);
+typedef int (elevator_kick_page_fn) (request_queue_t *, struct page *);
typedef int (elevator_init_fn) (request_queue_t *, elevator_t *);
typedef void (elevator_exit_fn) (elevator_t *);
@@ -34,6 +35,7 @@ struct elevator_ops
elevator_add_req_fn *elevator_add_req_fn;
elevator_activate_req_fn *elevator_activate_req_fn;
elevator_deactivate_req_fn *elevator_deactivate_req_fn;
+ elevator_kick_page_fn *elevator_kick_page_fn;
elevator_queue_empty_fn *elevator_queue_empty_fn;
elevator_completed_req_fn *elevator_completed_req_fn;
@@ -91,6 +93,7 @@ extern void elv_dispatch_sort(request_qu
extern void elv_add_request(request_queue_t *, struct request *, int, int);
extern void __elv_add_request(request_queue_t *, struct request *, int, int);
extern void elv_insert(request_queue_t *, struct request *, int);
+extern void elv_kick_page(request_queue_t *, struct page *);
extern int elv_merge(request_queue_t *, struct request **, struct bio *);
extern void elv_merge_requests(request_queue_t *, struct request *,
struct request *);
--- linux-2.6.17-rc5-mm3.orig/block/elevator.c
+++ linux-2.6.17-rc5-mm3/block/elevator.c
@@ -468,6 +468,16 @@ void elv_add_request(request_queue_t *q,
spin_unlock_irqrestore(q->queue_lock, flags);
}
+void elv_kick_page(request_queue_t *q, struct page *page)
+{
+ if (page && q->elevator && q->elevator->ops->elevator_kick_page_fn) {
+ spin_lock_irq(q->queue_lock);
+ q->elevator->ops->elevator_kick_page_fn(q, page);
+ spin_unlock_irq(q->queue_lock);
+ }
+
+}
+
static inline struct request *__elv_next_request(request_queue_t *q)
{
struct request *rq;
--
next prev parent reply other threads:[~2006-06-24 8:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060624082006.574472632@localhost.localdomain>
2006-06-24 8:20 ` [PATCH 0/7] [RFC] iosched: make a difference between read/readahead requests Fengguang Wu
[not found] ` <20060624082310.253199615@localhost.localdomain>
2006-06-24 8:20 ` [PATCH 1/7] iosched: introduce WRITEA Fengguang Wu
[not found] ` <20060624082311.501730089@localhost.localdomain>
2006-06-24 8:20 ` [PATCH 4/7] iosched: submit READA requests on possible readahead code path Fengguang Wu
[not found] ` <20060624082311.912265883@localhost.localdomain>
2006-06-24 8:20 ` Fengguang Wu [this message]
[not found] ` <20060624082312.833976992@localhost.localdomain>
2006-06-24 8:20 ` [PATCH 7/7] iosched: introduce deadline_kick_page() Fengguang Wu
2006-06-24 11:01 ` Jens Axboe
[not found] ` <20060625063232.GA5867@mail.ustc.edu.cn>
2006-06-25 6:32 ` Fengguang Wu
2006-06-28 11:27 ` Jens Axboe
[not found] ` <20060704013248.GA7333@mail.ustc.edu.cn>
2006-07-04 1:32 ` 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=351137383.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox