Re: An elevator algorithm (patch)

From: Andrea Arcangeli (andrea@suse.de)
Date: Sun Sep 17 2000 - 15:16:51 EST


On Sun, Sep 17, 2000 at 04:39:35PM -0300, Marcelo Tosatti wrote:
>
> On Sun, 17 Sep 2000, Andrea Arcangeli wrote:
>
> <snip>
>
> > If nobody does that before me I will try this "remeber last position of the
> > head" idea in my blkdev tree (there are many other pending elevator fixes in
> > it) as soon as I finished with 2.2.18pre9aa1 LFS nfsv3 and as soon as I finish
> > the fix for the spinlocks (this spinlock "memory" thing got starved over and
> > over again unfortunately, at least it's not an urgent fix :).
>
> Andrea,
>
> The 2.2 elevator code suffers from this problem too?

In the 2.2.x patches I didn't changed the ordering algorithm, see:

                        const int after_current = IN_ORDER(tmp,req);
                        const int before_next = IN_ORDER(req,tmp->next);

                        if (!IN_ORDER(tmp,tmp->next)) {
                                if (after_current || before_next)
                                        break;
                        } else {
                                if (after_current && before_next)
                                        break;
                        }

so it doesn't suffer form that problem. Also the elevator before
test2 didn't sufferred from that problem, see:

- while ((entry = entry->prev) != head) {
- if (!point && latency >= 0) {
- point = entry;
- point_latency = latency;
- }
- tmp = blkdev_entry_to_request(entry);
- if (elevator_sequence_before(tmp->elevator_sequence, sequence) || !tmp->q)
- break;
- if (latency >= 0) {
- if (IN_ORDER(tmp, req) ||
- (pass && !IN_ORDER(tmp, blkdev_next_request(tmp))))
- goto link;
- }
- latency += tmp->nr_segments;
- pass = 1;
- }
-
- if (point) {
- entry = point;
- latency = point_latency;
- }
-
- link:
- list_add(&req->queue, entry);
- req->elevator_sequence = elevator_sequence(elevator, latency);

And with the default latency values ("infinite") with the test2 elevator if
you're using scsi as your device, the patch can't make runtime differences
either.

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 21:00:15 EST