kernel/cam: Fix I/O performance regression seen at least in VMware ESXi.
authorSascha Wildner <saw@online.de>
Sun, 25 Aug 2013 18:15:37 +0000 (20:15 +0200)
committerSascha Wildner <saw@online.de>
Sun, 25 Aug 2013 18:15:37 +0000 (20:15 +0200)
commitc0c84ec8c33cbfcb5cd11375d09e05a73d64f0c2
tree8e78bf2180de76abf2b70b8ec0adf3b08960efbf
parent1f21445549fae8c2c2cae174378ce8bdbfd6e938
kernel/cam: Fix I/O performance regression seen at least in VMware ESXi.

This brings in FreeBSD's revisions 188570, 188670, 188671 and 188688.
188670 (most changed lines in the patch) is for debugging purposes only,
while 188570 and 188671 fix the actual issue and 188688 fixes gcc whining.

Reported-and-tested-by: Dongsheng Song <dongsheng.song@gmail.com>
Extra credit to vsrinivas who had actually pointed out 188570 to us a
while ago before it hit us now but at the time I hadn't noticed.

Quoting FreeBSD's commit messages:

r188570
-------
In the case that the probe has determined that it can't query the device
for a serial number, fall through to the next case so that initial
negotiation still happens.  Without this, devices were showing up with
only 1 available tag opening, leading to observations of very poor I/O
performance.

This should fix problems reported with VMWare Fusion and ESX.  Early
generation MPT-SAS controllers with SATA disks might also be affected.
HP CISS controllers are also likely affected, as are many other
pseudo-scsi disk subsystems.

r188671
-------
Fix parallel SCSI negotiation in the CAM_NEW_TRAN_CODE world order.
Overzealous sanity checks were locking the sync_rate and offset values
to zero, thanks to a twisty maze of recursive code.
sys/bus/cam/cam_xpt.c