#
407863cb |
| 23-Jan-2015 |
Stephen Cameron <stephenmcameron@gmail.com> |
hpsa: check for ctlr lockup after command allocation in main io path
Command allocation is the thing that takes the longest in the main i/o path, so check for controller lockup immediately after thi
hpsa: check for ctlr lockup after command allocation in main io path
Command allocation is the thing that takes the longest in the main i/o path, so check for controller lockup immediately after this to prevent submitting commands to locked up controller as much as possible.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
07543e0c |
| 23-Jan-2015 |
Stephen Cameron <stephenmcameron@gmail.com> |
hpsa: guard against overflowing raid map array
In the code that translates logical drive LBAs to physical drive LBAs if we overflow the raid map disk data array we will get the wrong answers. We do
hpsa: guard against overflowing raid map array
In the code that translates logical drive LBAs to physical drive LBAs if we overflow the raid map disk data array we will get the wrong answers. We do not expect that to happen, but best to be on the safe side and guard against it anyway.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
e4aa3e6a |
| 23-Jan-2015 |
Stephen Cameron <stephenmcameron@gmail.com> |
hpsa: do not ack controller events on controllers that do not support it
Acking controller events on controllers that do not support it can cause such controllers to lock up.
Reviewed-by: Scott Tee
hpsa: do not ack controller events on controllers that do not support it
Acking controller events on controllers that do not support it can cause such controllers to lock up.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Joe Handzik <joseph.t.handzik@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
6f99a916 |
| 23-Jan-2015 |
Stephen Cameron <stephenmcameron@gmail.com> |
hpsa: remove incorrect BUG_ONs checking for raid offload enable
In set_encrypt_ioaccel2() and in hpsa_scsi_ioaccel_raid_map there were BUG_ONs that looked like this:
BUG_ON(!(dev->offload_config &
hpsa: remove incorrect BUG_ONs checking for raid offload enable
In set_encrypt_ioaccel2() and in hpsa_scsi_ioaccel_raid_map there were BUG_ONs that looked like this:
BUG_ON(!(dev->offload_config && dev->offload_enabled));
But, In hpsa_ack_ctlr_events() we have this,
/* Stop sending new RAID offload reqs via the IO accelerator */ scsi_block_requests(h->scsi_host); for (i = 0; i < h->ndevices; i++) h->dev[i]->offload_enabled = 0; hpsa_drain_accel_commands(h);
So, we set offload_enabled = 0 for all drives, then do this drain_accel_commands, so that means accel commands could still be in flight, ie. perhaps having just been submitted into hpsa_scsi_ioaccel_raid_map concurrent with ->offload_enabled having just been set to zero.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
34f0c627 |
| 23-Jan-2015 |
Don Brace <don.brace@pmcs.com> |
hpsa: count passthru cmds with atomics, not a spin locked int
Performance enhancement. Remove spin_locks from the driver.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don
hpsa: count passthru cmds with atomics, not a spin locked int
Performance enhancement. Remove spin_locks from the driver.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
33811026 |
| 23-Jan-2015 |
Robert Elliott <elliott@hp.com> |
hpsa: optimize cmd_alloc function by remembering last allocation
Empirically, this improves performance slightly (~2% max IOPS) by allowing cmd_alloc to remember where it left off searching for free
hpsa: optimize cmd_alloc function by remembering last allocation
Empirically, this improves performance slightly (~2% max IOPS) by allowing cmd_alloc to remember where it left off searching for free commands between calls instead of always starting its search at command 0.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
281a7fd0 |
| 23-Jan-2015 |
Webb Scales <webbnh@hp.com> |
hpsa: fix race between abort handler and main i/o path
This means changing the allocator to reference count commands. The reference count is now the authoritative indicator of whether a command is a
hpsa: fix race between abort handler and main i/o path
This means changing the allocator to reference count commands. The reference count is now the authoritative indicator of whether a command is allocated or not. The h->cmd_pool_bits bitmap is now only a heuristic hint to speed up the allocation process, it is no longer the authoritative record of allocated commands.
Since we changed the command allocator to use reference counting as the authoritative indicator of whether a command is allocated, fail_all_outstanding_cmds needs to use the reference count not h->cmd_pool_bits for this purpose.
Fix hpsa_drain_accel_commands to use the reference count as the authoritative indicator of whether a command is allocated instead of the h->cmd_pool_bits bitmap.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
03383736 |
| 23-Jan-2015 |
Don Brace <don.brace@pmcs.com> |
hpsa: honor queue depth of physical devices
When using the ioaccel submission methods, requests destined for RAID volumes are sometimes diverted to physical devices. The OS has no or limited knowle
hpsa: honor queue depth of physical devices
When using the ioaccel submission methods, requests destined for RAID volumes are sometimes diverted to physical devices. The OS has no or limited knowledge of these physical devices, so it is up to the driver to avoid pushing the device too hard. It is better to honor the physical device queue limit rather than making the device spew zillions of TASK SET FULL responses.
This is so that hpsa based devices support /sys/block/sdNN/device/queue_type of simple, which lets the SCSI midlayer automatically adjust the queue_depth based on TASK SET FULL and GOOD status.
Adjust the queue depth for a new device after it is created based on the maximum queue depths of the physical devices that constitute the device. This drops the maximum queue depth from .can_queue of 1024 to something like 174 for single-drive RAID-0, 348 for two-drive RAID-1, etc. It also adjusts for the ratio of data to parity drives.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Webb Scales <webbnh@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
080ef1cc |
| 23-Jan-2015 |
Don Brace <don.brace@pmcs.com> |
hpsa: use workqueue to resubmit failed ioaccel commands
Instead of kicking the commands all the way back to the mid layer, use a work queue. This enables having a mechanism for the driver to be abl
hpsa: use workqueue to resubmit failed ioaccel commands
Instead of kicking the commands all the way back to the mid layer, use a work queue. This enables having a mechanism for the driver to be able to resubmit the commands down the "normal" raid path without turning off the ioaccel feature entirely whenever an error is encountered on the ioaccel path, and prevent excessive rescanning of devices.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
574f05d3 |
| 23-Jan-2015 |
Stephen Cameron <stephenmcameron@gmail.com> |
hpsa: factor out hpsa_ciss_submit function
Factor out the bottom part of the queuecommand function which is the part that builds commands for submitting down the "normal' RAID stack path of a Smart
hpsa: factor out hpsa_ciss_submit function
Factor out the bottom part of the queuecommand function which is the part that builds commands for submitting down the "normal' RAID stack path of a Smart Array.
Need to factor this out to improve how commands that were initially sent down one of the "ioaccellerated" paths but which have some sort of error condition are retried down the "normal" path.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
7acf570c |
| 23-Jan-2015 |
Stephen Cameron <stephenmcameron@gmail.com> |
hpsa: do not request device rescan on every ioaccel path error
The original reasoning behind doing this was faulty. An error of some sort would be encountered, accelerated i/o would be disabled for
hpsa: do not request device rescan on every ioaccel path error
The original reasoning behind doing this was faulty. An error of some sort would be encountered, accelerated i/o would be disabled for that logical drive, the command would be kicked back out to the SCSI midlayer for a retry, and since i/o accelerator mode was disabled, it would get retried down the RAID path. However, something needs to turn ioaccellerator mode back on, and this rescan request was what did that. However, it was racy, and extremely bad for performance to rescan all devices, so, don't do that.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
f2405db8 |
| 23-Jan-2015 |
Don Brace <don.brace@pmcs.com> |
hpsa: do not queue commands internally in driver
By not doing maintaining a list of queued commands, we can eliminate some spin locking in the main i/o path and gain significant improvement in IOPS.
hpsa: do not queue commands internally in driver
By not doing maintaining a list of queued commands, we can eliminate some spin locking in the main i/o path and gain significant improvement in IOPS. Remove the queuing code and the code that calls it; remove now-unused interrupt code; remove DIRECT_LOOKUP_BIT.
Now that the passthru commands share the same command pool as the main i/o path, and the total size of the pool is less than or equal to the number of commands that will fit in the hardware fifo, there is no need to check to see if we are exceeding the hardware fifo's depth.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Reviewed-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
45fcb86e |
| 23-Jan-2015 |
Stephen Cameron <stephenmcameron@gmail.com> |
hpsa: get rid of cmd_special_alloc and cmd_special_free
We have commands reserved for internal use.
This is laying the groundwork for removing the internal queue of commands from the driver so that
hpsa: get rid of cmd_special_alloc and cmd_special_free
We have commands reserved for internal use.
This is laying the groundwork for removing the internal queue of commands from the driver so that the locks that protect that queue may be removed.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
d54c5c24 |
| 23-Jan-2015 |
Stephen Cameron <stephenmcameron@gmail.com> |
hpsa: reserve some commands for use by driver
We need to reserve some commands for device rescans, aborts, and the pass through ioctls, etc. so we cannot give them all to the scsi mid layer.
This i
hpsa: reserve some commands for use by driver
We need to reserve some commands for device rescans, aborts, and the pass through ioctls, etc. so we cannot give them all to the scsi mid layer.
This is in preparation for removing cmd_special_alloc and cmd_special_free so that we can stop queuing commands internally in the driver so that we can remove the locks thta protect the queue that we will no longer have.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
8947fd10 |
| 23-Jan-2015 |
Robert Elliott <elliott@hp.com> |
hpsa: avoid unneccesary calls to resource freeing functions
If hpsa_allocate_cmd_pool failed, we were calling two functions unnecessarily:
hpsa_free_sg_chain_blocks(h); hpsa_free_cmd_pool(h);
hpsa: avoid unneccesary calls to resource freeing functions
If hpsa_allocate_cmd_pool failed, we were calling two functions unnecessarily:
hpsa_free_sg_chain_blocks(h); hpsa_free_cmd_pool(h);
This didn't cause any problem, as those functions can tolerate being called when what they free hasn't been allocated (relevant pointers would be NULL) but it is potentially confusing.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
2c143342 |
| 23-Jan-2015 |
Robert Elliott <elliott@hp.com> |
hpsa: fix memory leak in hpsa_alloc_cmd_pool
Partial allocation failure wasn't handled correctly
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-
hpsa: fix memory leak in hpsa_alloc_cmd_pool
Partial allocation failure wasn't handled correctly
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
3d4e6af8 |
| 23-Jan-2015 |
Robert Elliott <elliott@hp.com> |
hpsa: report allocation failures while allocating SG chain blocks
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmc
hpsa: report allocation failures while allocating SG chain blocks
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
1eaec8f3 |
| 23-Jan-2015 |
Robert Elliott <elliott@hp.com> |
hpsa: pass error from pci_set_consistent_dma_mask from hpsa_message
Return the actual error code instead of a generic error code.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert
hpsa: pass error from pci_set_consistent_dma_mask from hpsa_message
Return the actual error code instead of a generic error code.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
9ee61794 |
| 23-Jan-2015 |
Robert Elliott <elliott@hp.com> |
hpsa: rename hpsa_request_irq to hpsa_request_irqs
Make the function name more descriptive. We use more than one interrupt.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Ellio
hpsa: rename hpsa_request_irq to hpsa_request_irqs
Make the function name more descriptive. We use more than one interrupt.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
cd3c81c4 |
| 23-Jan-2015 |
Robert Elliott <elliott@hp.com> |
hpsa: report failure to ioremap config table
Enhance error reporting.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brac
hpsa: report failure to ioremap config table
Enhance error reporting.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
050f7147 |
| 23-Jan-2015 |
Stephen Cameron <stephenmcameron@gmail.com> |
hpsa: trivial message and comment clean ups
Cleanup comments to be more specific. Make messages more informational.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elli
hpsa: trivial message and comment clean ups
Cleanup comments to be more specific. Make messages more informational.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
c7ee65b3 |
| 23-Jan-2015 |
Webb Scales <webbnh@hp.com> |
hpsa: refactor hpsa_find_board_params() to encapsulate legacy test
Encapsulate the conditional predicate which tests for legacy controllers in a separate function and rework the code comments.
Revi
hpsa: refactor hpsa_find_board_params() to encapsulate legacy test
Encapsulate the conditional predicate which tests for legacy controllers in a separate function and rework the code comments.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Webb Scales <webbnh@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
1ba66c9c |
| 23-Jan-2015 |
Robert Elliott <elliott@hp.com> |
hpsa: downgrade the Waiting for no-op print to dev_info
There is nothing worrisome about the "Waiting for controller to respond to no-op" print, so use dev_info rather than dev_warn.
Reviewed-by: S
hpsa: downgrade the Waiting for no-op print to dev_info
There is nothing worrisome about the "Waiting for controller to respond to no-op" print, so use dev_info rather than dev_warn.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
60f923b9 |
| 23-Jan-2015 |
Robert Elliott <elliott@hp.com> |
hpsa: propagate return value from board ID lookup
If the board ID lookup function fails, return the return code rather than return -ENODEV.
The only board ID failure reason right now is -ENODEV, so
hpsa: propagate return value from board ID lookup
If the board ID lookup function fails, return the return code rather than return -ENODEV.
The only board ID failure reason right now is -ENODEV, so this just provides more informative prints in kdump and adapts to future changes.
Tested with error injection while booting with reset_devices on the kernel command line: [ 62.804324] injecting error in inj_hpsa_lookup_board_id: 1 11 [ 62.804423] hpsa 0000:04:00.0: Board ID not found
(the pci probe layer does not print an additional message if -ENODEV is the reason)
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
adf1b3a3 |
| 23-Jan-2015 |
Robert Elliott <elliott@hp.com> |
hpsa: propagate hard_reset failures in reset_devices mode
Return the real reason for kdump_hard_reset failure rather than change them all to -ENODEV.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> S
hpsa: propagate hard_reset failures in reset_devices mode
Return the real reason for kdump_hard_reset failure rather than change them all to -ENODEV.
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
show more ...
|