Skip to contentSkip to conversation

Readlatency-2

PATCH In review Marc-Christian Petersen 2 participants 2 messages Dec 5, 2002 – Dec 6, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Readlatency-2

Hi all,

as requested by GrandMasterLee (does he have a realname? ;) here goes readlatency2 for 2.4.20aa1. Apply ontop of it.

Note: This patch rippes out the elevator-lowlatency hack.

ciao, Marc

drivers/block/cciss.c +4 -4
diff -urN linux-2.4.20-aa1/drivers/block/cciss.c linux-2.4.20-aa1-rl2/drivers/block/cciss.c
@@ -1147,7 +1147,7 @@
 	}
 }
 
-static inline void complete_buffers(struct request * req, struct buffer_head *bh, int status)
+static inline void complete_buffers( struct buffer_head *bh, int status)
 {
 	struct buffer_head *xbh;
 	
@@ -1155,7 +1155,7 @@
 	{
 		xbh = bh->b_reqnext; 
 		bh->b_reqnext = NULL; 
-		blk_finished_io(req, bh->b_size >> 9);
+		blk_finished_io(bh->b_size >> 9);
 		bh->b_end_io(bh, status);
 		bh = xbh;
 	}
@@ -1267,7 +1267,7 @@
 				status=0;
 		}
 	}
-	complete_buffers(cmd->rq, cmd->rq->bh, status);
+	complete_buffers(cmd->rq->bh, status);
 
 #ifdef CCISS_DEBUG
 	printk("Done with %p\n", cmd->rq);
@@ -1352,7 +1352,7 @@
                 printk(KERN_WARNING "doreq cmd for %d, %x at %p\n",
                                 h->ctlr, creq->rq_dev, creq);
                 blkdev_dequeue_request(creq);
-                complete_buffers(creq, creq->bh, 0);
+                complete_buffers(creq->bh, 0);
 		end_that_request_last(creq);
 		goto startio;
         }
drivers/block/cpqarray.c +5 -5
diff -urN linux-2.4.20-aa1/drivers/block/cpqarray.c linux-2.4.20-aa1-rl2/drivers/block/cpqarray.c
@@ -168,7 +168,7 @@
 
 static inline void addQ(cmdlist_t **Qptr, cmdlist_t *c);
 static inline cmdlist_t *removeQ(cmdlist_t **Qptr, cmdlist_t *c);
-static inline void complete_buffers(struct request * req, struct buffer_head *bh, int ok);
+static inline void complete_buffers(struct buffer_head *bh, int ok);
 static inline void complete_command(cmdlist_t *cmd, int timeout);
 
 static void do_ida_intr(int irq, void *dev_id, struct pt_regs * regs);
@@ -990,7 +990,7 @@
 		printk(KERN_WARNING "doreq cmd for %d, %x at %p\n",
 				h->ctlr, creq->rq_dev, creq);
 		blkdev_dequeue_request(creq);
-		complete_buffers(creq, creq->bh, 0);
+		complete_buffers(creq->bh, 0);
 		end_that_request_last(creq);
 		goto startio;
 	}
@@ -1092,14 +1092,14 @@
 	}
 }
 
-static inline void complete_buffers(struct request * req, struct buffer_head *bh, int ok)
+static inline void complete_buffers(struct buffer_head *bh, int ok)
 {
 	struct buffer_head *xbh;
 	while(bh) {
 		xbh = bh->b_reqnext;
 		bh->b_reqnext = NULL;
 		
-		blk_finished_io(req, bh->b_size >> 9);
+		blk_finished_io(bh->b_size >> 9);
 		bh->b_end_io(bh, ok);
 
 		bh = xbh;
@@ -1140,7 +1140,7 @@
                         (cmd->req.hdr.cmd == IDA_READ) ? PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE);
         }
 
-	complete_buffers(cmd->rq, cmd->rq->bh, ok);
+	complete_buffers(cmd->rq->bh, ok);
 	DBGPX(printk("Done with %p\n", cmd->rq););
 	req_finished_io(cmd->rq);
 	end_that_request_last(cmd->rq);
drivers/block/elevator.c +78 -12

133 lines not on this page · raw message

drivers/block/ll_rw_blk.c +37 -46

197 lines not on this page · raw message

drivers/scsi/scsi_lib.c +1 -1
diff -urN linux-2.4.20-aa1/drivers/scsi/scsi_lib.c linux-2.4.20-aa1-rl2/drivers/scsi/scsi_lib.c
@@ -384,7 +384,7 @@
 	do {
 		if ((bh = req->bh) != NULL) {
 			nsect = bh->b_size >> 9;
-			blk_finished_io(req, nsect);
+			blk_finished_io(nsect);
 			req->bh = bh->b_reqnext;
 			bh->b_reqnext = NULL;
 			sectors -= nsect;
include/linux/blkdev.h +5 -54

95 lines not on this page · raw message

include/linux/elevator.h +16 -34

91 lines not on this page · raw message

include/linux/nbd.h +1 -1
diff -urN linux-2.4.20-aa1/include/linux/nbd.h linux-2.4.20-aa1-rl2/include/linux/nbd.h
@@ -48,7 +48,7 @@
 	spin_lock_irqsave(&io_request_lock, flags);
 	while((bh = req->bh) != NULL) {
 		nsect = bh->b_size >> 9;
-		blk_finished_io(req, nsect);
+		blk_finished_io(nsect);
 		req->bh = bh->b_reqnext;
 		bh->b_reqnext = NULL;
 		bh->b_end_io(bh, uptodate);
#1 lore raw
Quoted 6 lines · Marc-Christian Petersen

Hi all,

as requested by GrandMasterLee (does he have a realname? ;) here goes readlatency2 for 2.4.20aa1. Apply ontop of it.

Note: This patch rippes out the elevator-lowlatency hack.

how does it perform compared to elevator-lowlatency? I guess this is a call for Con to run a pass on it.

Actually I still think the 32M queue on a 32M scsi machine during contigous writes where the elevator basically doesn't matter is a ""bit"" overkill so I still like elevator-lowlatency somehow. elevator-lowlatency could do something smarter than it currently does though.

Andrea