Re: PATCH: Further aacraid work

From: James Bottomley
Date: Thu Jun 17 2004 - 14:23:05 EST


On Thu, 2004-06-17 at 10:15, Arjan van de Ven wrote:
> probably because of the buddy grouping/ungrouping;

Actually, doesn't seem to be. I instrumented clustering in 53c700 with
the patch below and then tried a BK based I/O stress test on a freshly
booted system (although any driver that is capable of coping with
clustering can be instrumented like this).

The results were 20 segments coalesced without the patch and 16 with it,
so I'd say within the margins of error that your patch has no effect on
trying to make the system allocate contiguous pages.

I suppose someone who has more time should try a longer running test.

James

===== drivers/scsi/53c700.c 1.50 vs edited =====
--- 1.50/drivers/scsi/53c700.c Sun Mar 14 11:09:55 2004
+++ edited/drivers/scsi/53c700.c Thu Jun 17 13:40:48 2004
@@ -329,7 +329,7 @@
tpnt->can_queue = NCR_700_COMMAND_SLOTS_PER_HOST;
tpnt->sg_tablesize = NCR_700_SG_SEGMENTS;
tpnt->cmd_per_lun = NCR_700_CMD_PER_LUN;
- tpnt->use_clustering = DISABLE_CLUSTERING;
+ tpnt->use_clustering = ENABLE_CLUSTERING;
tpnt->slave_configure = NCR_700_slave_configure;
tpnt->slave_destroy = NCR_700_slave_destroy;

@@ -1872,8 +1872,20 @@
__u32 count = 0;

if(SCp->use_sg) {
+ static int total = 0;
+ int diff = 0,i;
+ for (i=0; i<SCp->use_sg; i++) {
+ struct scatterlist *sg = &((struct scatterlist *)SCp->buffer)[i];
+ int size = sg->length + sg->offset;
+ if(size > PAGE_SIZE)
+ diff += size / PAGE_SIZE;
+ }
sg_count = dma_map_sg(hostdata->dev, SCp->buffer,
SCp->use_sg, direction);
+ total += diff;
+ if(diff)
+ printk("SG Coalesced %d segments (total %d)\n",
+ diff, total);
} else {
vPtr = dma_map_single(hostdata->dev,
SCp->request_buffer,

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