svn commit: r195614 - in head: share/man/man4 sys/dev/aac

Jung-uk Kim jkim at FreeBSD.org
Sat Jul 11 08:10:19 UTC 2009


Author: jkim
Date: Sat Jul 11 08:10:18 2009
New Revision: 195614
URL: http://svn.freebsd.org/changeset/base/195614

Log:
  Get correct maxio from the controller and drop the tunable.
  The default (64K) is too pessimistic for "new comm" hardware.
  Also, this is bad because multiple controllers get limited by
  the global tunable.
  
  Reviewed by:	scottl
  Approved by:	re (kensmith)

Modified:
  head/share/man/man4/aac.4
  head/sys/dev/aac/aac_disk.c

Modified: head/share/man/man4/aac.4
==============================================================================
--- head/share/man/man4/aac.4	Sat Jul 11 06:02:50 2009	(r195613)
+++ head/share/man/man4/aac.4	Sat Jul 11 08:10:18 2009	(r195614)
@@ -23,7 +23,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd June 27, 2008
+.Dd July 10, 2009
 .Dt AAC 4
 .Os
 .Sh NAME
@@ -86,24 +86,6 @@ Linux-compatible
 .Xr ioctl 2
 interface for the management device will be enabled and will allow
 Linux-based management applications to control the card.
-.Ss Tuning
-The read-only sysctl
-.Va hw.aac.iosize_max
-defaults to 65536 and may be set at boot time to another value via
-.Xr loader 8 .
-This value determines the maximum data transfer size allowed
-to/from an array.
-Setting it higher will result in better performance,
-especially for large sequential access patterns.
-.Em Beware :
-internal limitations
-of the card limit this value to 64K for arrays with many members.
-While it may be safe to raise this value, this is done
-.Em at the operator's own risk .
-Note also that
-performance peaks at a value of 96K,
-and drops off dramatically at 128K,
-due to other limitations of the card.
 .Sh HARDWARE
 Controllers supported by the
 .Nm
@@ -300,9 +282,7 @@ and are also queued for retrieval by a m
 .Xr kld 4 ,
 .Xr linux 4 ,
 .Xr scsi 4 ,
-.Xr kldload 8 ,
-.Xr loader 8 ,
-.Xr sysctl 8
+.Xr kldload 8
 .Sh HISTORY
 The
 .Nm

Modified: head/sys/dev/aac/aac_disk.c
==============================================================================
--- head/sys/dev/aac/aac_disk.c	Sat Jul 11 06:02:50 2009	(r195613)
+++ head/sys/dev/aac/aac_disk.c	Sat Jul 11 08:10:18 2009	(r195614)
@@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/systm.h>
 #include <sys/kernel.h>
 #include <sys/module.h>
-#include <sys/sysctl.h>
 
 #include <sys/bus.h>
 #include <sys/conf.h>
@@ -83,18 +82,8 @@ static driver_t aac_disk_driver = {
 	sizeof(struct aac_disk)
 };
 
-#define AAC_MAXIO	65536
-
 DRIVER_MODULE(aacd, aac, aac_disk_driver, aac_disk_devclass, 0, 0);
 
-/* sysctl tunables */
-static unsigned int aac_iosize_max = AAC_MAXIO;	/* due to limits of the card */
-TUNABLE_INT("hw.aac.iosize_max", &aac_iosize_max);
-
-SYSCTL_DECL(_hw_aac);
-SYSCTL_UINT(_hw_aac, OID_AUTO, iosize_max, CTLFLAG_RDTUN, &aac_iosize_max, 0,
-	    "Max I/O size per transfer to an array");
-
 /*
  * Handle open from generic layer.
  *
@@ -236,7 +225,7 @@ aac_dump_map_sg64(void *arg, bus_dma_seg
 /*
  * Dump memory out to an array
  *
- * Send out one command at a time with up to AAC_MAXIO of data.
+ * Send out one command at a time with up to maxio of data.
  */
 static int
 aac_disk_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t length)
@@ -244,7 +233,7 @@ aac_disk_dump(void *arg, void *virtual, 
 	struct aac_disk *ad;
 	struct aac_softc *sc;
 	struct aac_fib *fib;
-	size_t len;
+	size_t len, maxio;
 	int size;
 	static bus_dmamap_t dump_datamap;
 	static int first = 0;
@@ -272,7 +261,8 @@ aac_disk_dump(void *arg, void *virtual, 
 	fib = &sc->aac_common->ac_sync_fib;
 
 	while (length > 0) {
-		len = (length > AAC_MAXIO) ? AAC_MAXIO : length;
+		maxio = sc->aac_max_sectors << 9;
+		len = (length > maxio) ? maxio : length;
 		if ((sc->flags & AAC_FLAGS_SG_64BIT) == 0) {
 			struct aac_blockwrite *bw;
 			bw = (struct aac_blockwrite *)&fib->data[0];
@@ -408,7 +398,7 @@ aac_disk_attach(device_t dev)
 	sc->ad_disk = disk_alloc();
 	sc->ad_disk->d_drv1 = sc;
 	sc->ad_disk->d_name = "aacd";
-	sc->ad_disk->d_maxsize = aac_iosize_max;
+	sc->ad_disk->d_maxsize = sc->ad_controller->aac_max_sectors << 9;
 	sc->ad_disk->d_open = aac_disk_open;
 	sc->ad_disk->d_close = aac_disk_close;
 	sc->ad_disk->d_strategy = aac_disk_strategy;


More information about the svn-src-all mailing list