All of lore.kernel.org
 help / color / mirror / Atom feed
* Possible explanation for SCSI benchmark problems in 2.5
@ 2002-09-29 20:48 James Bottomley
  2002-09-29 20:53 ` Andrew Morton
  2002-09-29 21:32 ` Mike Anderson
  0 siblings, 2 replies; 9+ messages in thread
From: James Bottomley @ 2002-09-29 20:48 UTC (permalink / raw)
  To: linux-scsi; +Cc: Andrew Morton, Jens Axboe

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

Hi All,

While looking at other code (OK, how to get the MCA drivers not to use bounce 
buffers...)  I discovered that the way scsi_scan.c calls 
scsi_initialize_merge_fn() guarantees (on an x86) that the 
blk_queue_bounce_limit is always called with BLK_BOUNCE_HIGH.  This will 
probably hurt benchmarks on machines with 1Gb or more of memory.

The problem is that scsi_initialize_merge_fn() checks sdev->type, but this is 
always -1 in scsi_alloc_sdev, and thus it never uses the pci dma mask for disk 
devices.

The attached patch moves the initialisation to after sdev->type has the 
correct value.

James


[-- Attachment #2: bounce_limit.diff --]
[-- Type: text/plain , Size: 750 bytes --]

===== drivers/scsi/scsi_scan.c 1.21 vs edited =====
--- 1.21/drivers/scsi/scsi_scan.c	Wed Aug 14 10:06:05 2002
+++ edited/drivers/scsi/scsi_scan.c	Sun Sep 29 15:41:47 2002
@@ -528,7 +528,6 @@
 		scsi_initialize_queue(sdev, shost);
 		sdev->request_queue.queuedata = (void *) sdev;
 
-		scsi_initialize_merge_fn(sdev);
 		init_waitqueue_head(&sdev->scpnt_wait);
 
 		/*
@@ -1408,6 +1407,11 @@
 	sdev->removable = (0x80 & inq_result[1]) >> 7;
 	sdev->lockable = sdev->removable;
 	sdev->soft_reset = (inq_result[7] & 1) && ((inq_result[3] & 7) == 2);
+
+	/* initialise merge function needs some of the above data to 
+	 * work correctly */
+	scsi_initialize_merge_fn(sdev);
+
 
 	/*
 	 * XXX maybe move the identifier and driverfs/devfs setup to a new

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

end of thread, other threads:[~2002-09-30  7:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-29 20:48 Possible explanation for SCSI benchmark problems in 2.5 James Bottomley
2002-09-29 20:53 ` Andrew Morton
2002-09-30  7:30   ` Jens Axboe
2002-09-30  7:46     ` Andrew Morton
2002-09-30  7:47       ` Jens Axboe
2002-09-29 21:32 ` Mike Anderson
2002-09-30  3:40   ` James Bottomley
2002-09-30  6:15     ` Kai Makisara
2002-09-30  7:32   ` Jens Axboe

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.