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)
This commit is contained in:
parent
e5921a6fae
commit
ba5583d318
@ -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 management application.
|
||||
.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
|
||||
|
@ -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_segment_t *segs, int nsegs, int error)
|
||||
/*
|
||||
* 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, vm_offset_t physical, off_t offset, size
|
||||
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, vm_offset_t physical, off_t offset, size
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user