]> xenbits.xensource.com Git - qemu-xen-4.1-testing.git/commitdiff
improve DMA transfers by increasing the size of DMA buffers.
authorIan Jackson <iwj@mariner.uk.xensource.com>
Fri, 28 Mar 2008 16:20:45 +0000 (16:20 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 12 May 2008 11:20:10 +0000 (12:20 +0100)
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Cross-ported from xen-unstable f4a92f0db20fda98a633c149e3396c005a759a77

hw/scsi-disk.c

index 91fcc70a04dd9babf9db869aab831c66529fd831..3f781666380f8d598e09feaa34b93366682e1c85 100644 (file)
@@ -34,7 +34,12 @@ do { fprintf(stderr, "scsi-disk: " fmt , ##args); } while (0)
 #define SENSE_HARDWARE_ERROR  4
 #define SENSE_ILLEGAL_REQUEST 5
 
-#define SCSI_DMA_BUF_SIZE    65536
+#ifdef CONFIG_STUBDOM
+#include <xen/io/blkif.h>
+#define SCSI_DMA_BUF_SIZE    (BLKIF_MAX_SEGMENTS_PER_REQUEST * TARGET_PAGE_SIZE)
+#else
+#define SCSI_DMA_BUF_SIZE    131072
+#endif
 
 typedef struct SCSIRequest {
     SCSIDeviceState *dev;