All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm] [1/3] add elv_extended_request call to iosched API
@ 2006-08-04  2:11 Nate Diller
  2006-08-04  5:20 ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Nate Diller @ 2006-08-04  2:11 UTC (permalink / raw)
  To: Andrew Morton, Jens Axboe; +Cc: Linux Kernel Mailing List

the Elevator iosched would prefer to be unconditionally notified of a
merge, but the current API calls only one 'merge' notifier
(elv_merge_requests or elv_merged_requests), even if both front and
back merges happened.

elv_extended_request satisfies this requirement in conjunction with
elv_merge_requests.

Signed-off-by: Nate Diller <nate.diller@gmail.com>

---
 block/elevator.c         |    9 +++++++++
 block/ll_rw_blk.c        |    2 ++
 include/linux/elevator.h |    4 ++++
 3 files changed, 15 insertions(+)
---

diff -urpN -X dontdiff linux-2.6.18-rc1-mm2/block/elevator.c
linux-dput/block/elevator.c
--- linux-2.6.18-rc1-mm2/block/elevator.c	2006-07-18 14:52:29.000000000 -0700
+++ linux-dput/block/elevator.c	2006-08-03 18:42:00.000000000 -0700
@@ -287,6 +287,15 @@ void elv_merged_request(request_queue_t
 	q->last_merge = rq;
 }

+void elv_extended_request(request_queue_t *q, struct request *rq,
+			int direction, int nr_sectors)
+{
+	elevator_t *e = q->elevator;
+
+	if (e->ops->elevator_extended_req_fn)
+		e->ops->elevator_extended_req_fn(q, rq, direction, nr_sectors);
+}
+
 void elv_merge_requests(request_queue_t *q, struct request *rq,
 			     struct request *next)
 {
diff -urpN -X dontdiff linux-2.6.18-rc1-mm2/block/ll_rw_blk.c
linux-dput/block/ll_rw_blk.c
--- linux-2.6.18-rc1-mm2/block/ll_rw_blk.c	2006-07-18 15:00:44.000000000 -0700
+++ linux-dput/block/ll_rw_blk.c	2006-08-03 18:42:00.000000000 -0700
@@ -2895,6 +2895,7 @@ static int __make_request(request_queue_
 			req->nr_sectors = req->hard_nr_sectors += nr_sectors;
 			req->ioprio = ioprio_best(req->ioprio, prio);
 			drive_stat_acct(req, nr_sectors, 0);
+			elv_extended_request(q, req, el_ret, nr_sectors);
 			if (!attempt_back_merge(q, req))
 				elv_merged_request(q, req);
 			goto out;
@@ -2922,6 +2923,7 @@ static int __make_request(request_queue_
 			req->nr_sectors = req->hard_nr_sectors += nr_sectors;
 			req->ioprio = ioprio_best(req->ioprio, prio);
 			drive_stat_acct(req, nr_sectors, 0);
+			elv_extended_request(q, req, el_ret, nr_sectors);
 			if (!attempt_front_merge(q, req))
 				elv_merged_request(q, req);
 			goto out;
diff -urpN -X dontdiff linux-2.6.18-rc1-mm2/include/linux/elevator.h
linux-dput/include/linux/elevator.h
--- linux-2.6.18-rc1-mm2/include/linux/elevator.h	2006-06-17
18:49:35.000000000 -0700
+++ linux-dput/include/linux/elevator.h	2006-08-03 18:42:00.000000000 -0700
@@ -6,6 +6,8 @@ typedef int (elevator_merge_fn) (request

 typedef void (elevator_merge_req_fn) (request_queue_t *, struct
request *, struct request *);

+typedef void (elevator_extended_req_fn) (request_queue_t *, struct
request *, int, int);
+
 typedef void (elevator_merged_fn) (request_queue_t *, struct request *);

 typedef int (elevator_dispatch_fn) (request_queue_t *, int);
@@ -28,6 +30,7 @@ struct elevator_ops
 {
 	elevator_merge_fn *elevator_merge_fn;
 	elevator_merged_fn *elevator_merged_fn;
+	elevator_extended_req_fn *elevator_extended_req_fn;
 	elevator_merge_req_fn *elevator_merge_req_fn;

 	elevator_dispatch_fn *elevator_dispatch_fn;
@@ -94,6 +97,7 @@ extern void elv_insert(request_queue_t *
 extern int elv_merge(request_queue_t *, struct request **, struct bio *);
 extern void elv_merge_requests(request_queue_t *, struct request *,
 			       struct request *);
+extern void elv_extended_request(request_queue_t *, struct request *,
int, int);
 extern void elv_merged_request(request_queue_t *, struct request *);
 extern void elv_dequeue_request(request_queue_t *, struct request *);
 extern void elv_requeue_request(request_queue_t *, struct request *);

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH -mm] [1/3] add elv_extended_request call to iosched API
  2006-08-04  2:11 [PATCH -mm] [1/3] add elv_extended_request call to iosched API Nate Diller
@ 2006-08-04  5:20 ` Jens Axboe
  2006-08-04  5:45   ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2006-08-04  5:20 UTC (permalink / raw)
  To: Nate Diller; +Cc: Andrew Morton, Linux Kernel Mailing List

On Thu, Aug 03 2006, Nate Diller wrote:
> the Elevator iosched would prefer to be unconditionally notified of a
> merge, but the current API calls only one 'merge' notifier
> (elv_merge_requests or elv_merged_requests), even if both front and
> back merges happened.
> 
> elv_extended_request satisfies this requirement in conjunction with
> elv_merge_requests.

Ok, I suppose. But please rebase patches against the 'block' git branch,
there are extensive changes in this area.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH -mm] [1/3] add elv_extended_request call to iosched API
  2006-08-04  5:20 ` Jens Axboe
@ 2006-08-04  5:45   ` Andrew Morton
  2006-08-04 13:39     ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2006-08-04  5:45 UTC (permalink / raw)
  To: Jens Axboe; +Cc: nate.diller, linux-kernel

On Fri, 4 Aug 2006 07:20:32 +0200
Jens Axboe <axboe@suse.de> wrote:

> On Thu, Aug 03 2006, Nate Diller wrote:
> > the Elevator iosched would prefer to be unconditionally notified of a
> > merge, but the current API calls only one 'merge' notifier
> > (elv_merge_requests or elv_merged_requests), even if both front and
> > back merges happened.
> > 
> > elv_extended_request satisfies this requirement in conjunction with
> > elv_merge_requests.
> 
> Ok, I suppose. But please rebase patches against the 'block' git branch,
> there are extensive changes in this area.
> 

argh, the great (but partial ;)) renaming bites again.

A suitable patch to merge against is
http://www.zip.com.au/~akpm/linux/patches/stuff/git-block.patch

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH -mm] [1/3] add elv_extended_request call to iosched API
  2006-08-04  5:45   ` Andrew Morton
@ 2006-08-04 13:39     ` Jens Axboe
  2006-08-07 23:14       ` Nate Diller
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2006-08-04 13:39 UTC (permalink / raw)
  To: Andrew Morton; +Cc: nate.diller, linux-kernel

On Thu, Aug 03 2006, Andrew Morton wrote:
> On Fri, 4 Aug 2006 07:20:32 +0200
> Jens Axboe <axboe@suse.de> wrote:
> 
> > On Thu, Aug 03 2006, Nate Diller wrote:
> > > the Elevator iosched would prefer to be unconditionally notified of a
> > > merge, but the current API calls only one 'merge' notifier
> > > (elv_merge_requests or elv_merged_requests), even if both front and
> > > back merges happened.
> > > 
> > > elv_extended_request satisfies this requirement in conjunction with
> > > elv_merge_requests.
> > 
> > Ok, I suppose. But please rebase patches against the 'block' git branch,
> > there are extensive changes in this area.
> > 
> 
> argh, the great (but partial ;)) renaming bites again.
> 
> A suitable patch to merge against is
> http://www.zip.com.au/~akpm/linux/patches/stuff/git-block.patch

not so much the renaming (that's easy enough), but the elevator core
parts changed in some areas.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH -mm] [1/3] add elv_extended_request call to iosched API
  2006-08-04 13:39     ` Jens Axboe
@ 2006-08-07 23:14       ` Nate Diller
  2006-08-07 23:42         ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Nate Diller @ 2006-08-07 23:14 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Andrew Morton, linux-kernel

On 8/4/06, Jens Axboe <axboe@suse.de> wrote:
> On Thu, Aug 03 2006, Andrew Morton wrote:
> > On Fri, 4 Aug 2006 07:20:32 +0200
> > Jens Axboe <axboe@suse.de> wrote:
> >
> > > On Thu, Aug 03 2006, Nate Diller wrote:
> > > > the Elevator iosched would prefer to be unconditionally notified of a
> > > > merge, but the current API calls only one 'merge' notifier
> > > > (elv_merge_requests or elv_merged_requests), even if both front and
> > > > back merges happened.
> > > >
> > > > elv_extended_request satisfies this requirement in conjunction with
> > > > elv_merge_requests.
> > >
> > > Ok, I suppose. But please rebase patches against the 'block' git branch,
> > > there are extensive changes in this area.
> > >
> >
> > argh, the great (but partial ;)) renaming bites again.
> >
> > A suitable patch to merge against is
> > http://www.zip.com.au/~akpm/linux/patches/stuff/git-block.patch
>
> not so much the renaming (that's easy enough), but the elevator core
> parts changed in some areas.

would it be appropriate to submit against 2.6.18-rc3-mm2?  I hope to
have a much-cleaned-up version tomorrow

thanks

NATE

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH -mm] [1/3] add elv_extended_request call to iosched API
  2006-08-07 23:14       ` Nate Diller
@ 2006-08-07 23:42         ` Andrew Morton
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2006-08-07 23:42 UTC (permalink / raw)
  To: Nate Diller; +Cc: Jens Axboe, linux-kernel

On Mon, 7 Aug 2006 16:14:59 -0700
"Nate Diller" <nate.diller@gmail.com> wrote:

> On 8/4/06, Jens Axboe <axboe@suse.de> wrote:
> > On Thu, Aug 03 2006, Andrew Morton wrote:
> > > On Fri, 4 Aug 2006 07:20:32 +0200
> > > Jens Axboe <axboe@suse.de> wrote:
> > >
> > > > On Thu, Aug 03 2006, Nate Diller wrote:
> > > > > the Elevator iosched would prefer to be unconditionally notified of a
> > > > > merge, but the current API calls only one 'merge' notifier
> > > > > (elv_merge_requests or elv_merged_requests), even if both front and
> > > > > back merges happened.
> > > > >
> > > > > elv_extended_request satisfies this requirement in conjunction with
> > > > > elv_merge_requests.
> > > >
> > > > Ok, I suppose. But please rebase patches against the 'block' git branch,
> > > > there are extensive changes in this area.
> > > >
> > >
> > > argh, the great (but partial ;)) renaming bites again.
> > >
> > > A suitable patch to merge against is
> > > http://www.zip.com.au/~akpm/linux/patches/stuff/git-block.patch
> >
> > not so much the renaming (that's easy enough), but the elevator core
> > parts changed in some areas.
> 
> would it be appropriate to submit against 2.6.18-rc3-mm2?

Yes, that should give us a patch which Jens can use.

Be aware that I've just gone and dropped git-block.patch due to
suspend/resume problems.  I expect it'll come back within a suitable
timeframe for you, but if it doesn't, inclusion in -mm might be delayed.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-08-07 23:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-04  2:11 [PATCH -mm] [1/3] add elv_extended_request call to iosched API Nate Diller
2006-08-04  5:20 ` Jens Axboe
2006-08-04  5:45   ` Andrew Morton
2006-08-04 13:39     ` Jens Axboe
2006-08-07 23:14       ` Nate Diller
2006-08-07 23:42         ` Andrew Morton

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.