[2180] in linux-scsi channel archive
Re: SG_BIG_BUFF
daemon@ATHENA.MIT.EDU (Leonard N. Zubkoff)
Fri Jul 18 23:32:54 1997
Date: Fri, 18 Jul 1997 20:29:04 -0700
From: "Leonard N. Zubkoff" <lnz@dandelion.com>
To: pete@jones.asd.sel.sony.com
CC: linux-scsi@vger.rutgers.edu
In-reply-to: <199707180152.SAA00570@jones.asd.sel.sony.com> (message from Pete
Popov on Thu, 17 Jul 1997 18:52:50 -0700)
Date: Thu, 17 Jul 1997 18:52:50 -0700
From: Pete Popov <pete@jones.asd.sel.sony.com>
Does anyone know if there is any reason why SG_BIG_BUFF is
limited to 32768 and ST_BUFFER_BLOCKS to 32?
No idea.
This limits the size of data transfers too much for modern
high end tape devices. I would like to be able to dump larger
transfers, so I defined SG_BIG_BUFF as 4*32768 and ST_BUFFER_BLOCKS
as 128. After recompiling the kernel, I did a quick test and verified
that st was transferring up to ~128KB, depending on the parameters
passed to tar. However, I don't know if there's any danger lurking
in the dark that I don't know of.
Is this "safe"?
Should be. I only need a single tape drive and run with the patch below to
increase the block sizes.
Leonard
--- linux/drivers/scsi/st_options.h- Sun Dec 17 00:59:24 1995
+++ linux/drivers/scsi/st_options.h Sat Mar 8 01:19:30 1997
@@ -18,7 +18,7 @@
/* The minimum limit for the number of SCSI tape devices is determined by
ST_MAX_TAPES. If the number of tape devices and the "slack" defined by
ST_EXTRA_DEVS exceeds ST_MAX_TAPES, the large number is used. */
-#define ST_MAX_TAPES 4
+#define ST_MAX_TAPES 1
/* The driver does not wait for some operations to finish before returning
to the user program if ST_NOWAIT is non-zero. This helps if the SCSI
@@ -42,17 +42,17 @@
#define ST_DEFAULT_BLOCK 0
/* The tape driver buffer size in kilobytes. */
-#define ST_BUFFER_BLOCKS 32
+#define ST_BUFFER_BLOCKS 128
/* The number of kilobytes of data in the buffer that triggers an
asynchronous write in fixed block mode. See also ST_ASYNC_WRITES
below. */
-#define ST_WRITE_THRESHOLD_BLOCKS 30
+#define ST_WRITE_THRESHOLD_BLOCKS 120
/* The maximum number of tape buffers the driver allocates. The number
is also constrained by the number of drives detected. Determines the
maximum number of concurrently active tape drives. */
-#define ST_MAX_BUFFERS (2 + ST_EXTRA_DEVS)
+#define ST_MAX_BUFFERS 1
/* The following lines define defaults for properties that can be set