[PATCH 00/14] cxlflash: Fixes, enhancements, cleanup and staging

2016-11-15 Thread Uma Krishnan
AFU command lock cxlflash: Cleanup send_tmf() cxlflash: Cleanup queuecommand() cxlflash: Migrate IOARRIN specific routines to function pointers cxlflash: Migrate scsi command pointer to AFU command Uma Krishnan (4): cxlflash: Set sg_tablesize to 1 instead of SG_NONE cxlflash: Fix crash

[PATCH 02/14] cxlflash: Fix crash in cxlflash_restore_luntable()

2016-11-15 Thread Uma Krishnan
recovery operation. To fix this issue, the local LUN information structure is updated to reflect the LUN is no longer in the LUN table once all references to the LUN are gone. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/lunmgt.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a

[PATCH 03/14] cxlflash: Improve context_reset() logic

2016-11-15 Thread Uma Krishnan
long as only a single reset request is active at any one point in time. This commit simplifies the reset routine by removing the wait for command room. Additionally it adds a debug trace to help pinpoint hardware errors when a context reset does not complete. Signed-off-by: Uma Krishnan

[PATCH 01/14] cxlflash: Set sg_tablesize to 1 instead of SG_NONE

2016-11-15 Thread Uma Krishnan
of values results in the Oops above. To resolve this issue, sg_tablesize for cxlflash can simply be set to 1, a value which satisfies the constraints in cxlflash and the lack of support of SG_NONE in SCSI blk_mq. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c | 2 +- 1 file changed

[PATCH 05/14] cxlflash: Remove unused buffer from AFU command

2016-11-15 Thread Uma Krishnan
From: "Matthew R. Ochs" The cxlflash driver originally required a per-command 4K buffer that hosted data passed to the AFU. When the routines that initiate AFU and internal SCSI commands were refactored to use scsi_execute(), the need for this buffer became obsolete. As it is no longer necessary,

[PATCH 04/14] cxlflash: Avoid command room violation

2016-11-15 Thread Uma Krishnan
/exchange, the cached value can be incorrectly clobbered. To correct these issues, the runtime updates of the cached command room are updated to use atomic64_cmpxchg() and the send routine is updated to take into account the current thread consuming a hardware command. Signed-off-by: Uma

[PATCH 07/14] cxlflash: Use cmd_size for private commands

2016-11-15 Thread Uma Krishnan
From: "Matthew R. Ochs" Instead of using a private pool of AFU commands, use cmd_size to prime the private pool of SCSI commands such that they are allocated with a size large enough to contain an aligned AFU command. Use scsi_cmd_priv() to derive the aligned/zeroed private command on queuecomman

[PATCH 06/14] cxlflash: Allocate memory instead of using command pool for AFU sync

2016-11-15 Thread Uma Krishnan
From: "Matthew R. Ochs" As staging for the removal of the AFU command pool, remove the reliance upon the pool for the internal AFU sync command. Instead of obtaining an AFU command from the pool, dynamically allocate memory with the appropriate alignment requirements. Since the AFU sync service i

[PATCH 08/14] cxlflash: Remove private command pool

2016-11-15 Thread Uma Krishnan
From: "Matthew R. Ochs" Clean up and remove the remaining private command pool infrastructure that is no longer required. Signed-off-by: Matthew R. Ochs --- drivers/scsi/cxlflash/common.h | 7 - drivers/scsi/cxlflash/main.c | 68 -- 2 files change

[PATCH 09/14] cxlflash: Wait for active AFU commands to timeout upon tear down

2016-11-15 Thread Uma Krishnan
From: "Matthew R. Ochs" With the removal of the static private command pool, the ability to 'complete' outstanding commands was lost. While not an issue for the commands originating outside the driver, internal AFU commands are synchronous and therefore have a timeout associated with them. To avo

[PATCH 10/14] cxlflash: Remove AFU command lock

2016-11-15 Thread Uma Krishnan
From: "Matthew R. Ochs" The original design of the cxlflash driver required AFU commands to convey state information across multiple threads. The IOASA "host use" byte was used to track if a command was done, errored, or timed out. A per-command spin lock was used to serialize access to this byte

[PATCH 11/14] cxlflash: Cleanup send_tmf()

2016-11-15 Thread Uma Krishnan
From: "Matthew R. Ochs" The send_tmf() routine includes some copy/paste cruft that can be removed as well as the setting of an AFU command-specific while holding the tmf_slock. While not a bug, it is out of place and should be shifted down alongside the other command initialization statements for

[PATCH 12/14] cxlflash: Cleanup queuecommand()

2016-11-15 Thread Uma Krishnan
From: "Matthew R. Ochs" The queuecommand routine is disorganized where it populates the private command and also contains some logic/statements that are not needed given that cxlflash devices do not (and likely never will) support scatter-gather. Restructure the code to remove the unnecessary lo

[PATCH 13/14] cxlflash: Migrate IOARRIN specific routines to function pointers

2016-11-15 Thread Uma Krishnan
From: "Matthew R. Ochs" As staging for supporting hardware with a different queuing mechanism, move the send_cmd() and context_reset() routines to function pointers that are configured when the AFU is initialized. In addition, rename the existing routines to better reflect the queue model they su

[PATCH 14/14] cxlflash: Migrate scsi command pointer to AFU command

2016-11-15 Thread Uma Krishnan
From: "Matthew R. Ochs" Currently, when sending a SCSI command, the pointer is stored in a reserved field of the AFU command descriptor for retrieval once the SCSI command has completed. In order to support new descriptor formats that make use of the reserved field, the pointer is migrated to out

Re: [PATCH 04/14] cxlflash: Avoid command room violation

2016-11-17 Thread Uma Krishnan
Thanks for catching this Matt. Looking into this. Will send out a V2. On 11/17/2016 1:36 PM, Matthew R. Ochs wrote: Hi Uma, I do see a potential hang issue with this patch. See my comments below. -matt On Nov 15, 2016, at 5:14 PM, Uma Krishnan wrote: During test, a command room violation

[PATCH v2 00/14] cxlflash: Fixes, enhancements, cleanup and staging

2016-11-28 Thread Uma Krishnan
pointer to AFU command Uma Krishnan (4): cxlflash: Set sg_tablesize to 1 instead of SG_NONE cxlflash: Fix crash in cxlflash_restore_luntable() cxlflash: Improve context_reset() logic cxlflash: Avoid command room violation drivers/scsi/cxlflash/common.h | 39 ++-- drivers/scsi/cxlflash

[PATCH v2 02/14] cxlflash: Fix crash in cxlflash_restore_luntable()

2016-11-28 Thread Uma Krishnan
recovery operation. To fix this issue, the local LUN information structure is updated to reflect the LUN is no longer in the LUN table once all references to the LUN are gone. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/lunmgt.c | 6 ++ 1 file changed, 6

[PATCH v2 01/14] cxlflash: Set sg_tablesize to 1 instead of SG_NONE

2016-11-28 Thread Uma Krishnan
of values results in the Oops above. To resolve this issue, sg_tablesize for cxlflash can simply be set to 1, a value which satisfies the constraints in cxlflash and the lack of support of SG_NONE in SCSI blk_mq. Signed-off-by: Uma Krishnan Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash

[PATCH v2 03/14] cxlflash: Improve context_reset() logic

2016-11-28 Thread Uma Krishnan
long as only a single reset request is active at any one point in time. This commit simplifies the reset routine by removing the wait for command room. Additionally it adds a debug trace to help pinpoint hardware errors when a context reset does not complete. Signed-off-by: Uma Krishnan Acked-by

[PATCH v2 05/14] cxlflash: Remove unused buffer from AFU command

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" The cxlflash driver originally required a per-command 4K buffer that hosted data passed to the AFU. When the routines that initiate AFU and internal SCSI commands were refactored to use scsi_execute(), the need for this buffer became obsolete. As it is no longer necessary,

[PATCH v2 06/14] cxlflash: Allocate memory instead of using command pool for AFU sync

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" As staging for the removal of the AFU command pool, remove the reliance upon the pool for the internal AFU sync command. Instead of obtaining an AFU command from the pool, dynamically allocate memory with the appropriate alignment requirements. Since the AFU sync service i

[PATCH v2 04/14] cxlflash: Avoid command room violation

2016-11-28 Thread Uma Krishnan
of cached value also takes into account the current thread consuming a hardware command. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/common.h | 4 +-- drivers/scsi/cxlflash/main.c | 66 -- 2 files changed, 20 insertions(+), 50 deletions

[PATCH v2 09/14] cxlflash: Wait for active AFU commands to timeout upon tear down

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" With the removal of the static private command pool, the ability to 'complete' outstanding commands was lost. While not an issue for the commands originating outside the driver, internal AFU commands are synchronous and therefore have a timeout associated with them. To avo

[PATCH v2 08/14] cxlflash: Remove private command pool

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" Clean up and remove the remaining private command pool infrastructure that is no longer required. Signed-off-by: Matthew R. Ochs --- drivers/scsi/cxlflash/common.h | 7 - drivers/scsi/cxlflash/main.c | 68 -- 2 files change

[PATCH v2 07/14] cxlflash: Use cmd_size for private commands

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" Instead of using a private pool of AFU commands, use cmd_size to prime the private pool of SCSI commands such that they are allocated with a size large enough to contain an aligned AFU command. Use scsi_cmd_priv() to derive the aligned/zeroed private command on queuecomman

[PATCH v2 10/14] cxlflash: Remove AFU command lock

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" The original design of the cxlflash driver required AFU commands to convey state information across multiple threads. The IOASA "host use" byte was used to track if a command was done, errored, or timed out. A per-command spin lock was used to serialize access to this byte

[PATCH v2 14/14] cxlflash: Migrate scsi command pointer to AFU command

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" Currently, when sending a SCSI command, the pointer is stored in a reserved field of the AFU command descriptor for retrieval once the SCSI command has completed. In order to support new descriptor formats that make use of the reserved field, the pointer is migrated to out

[PATCH v2 11/14] cxlflash: Cleanup send_tmf()

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" The send_tmf() routine includes some copy/paste cruft that can be removed as well as the setting of an AFU command-specific while holding the tmf_slock. While not a bug, it is out of place and should be shifted down alongside the other command initialization statements for

[PATCH v2 12/14] cxlflash: Cleanup queuecommand()

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" The queuecommand routine is disorganized where it populates the private command and also contains some logic/statements that are not needed given that cxlflash devices do not (and likely never will) support scatter-gather. Restructure the code to remove the unnecessary lo

[PATCH v2 13/14] cxlflash: Migrate IOARRIN specific routines to function pointers

2016-11-28 Thread Uma Krishnan
From: "Matthew R. Ochs" As staging for supporting hardware with a different queuing mechanism, move the send_cmd() and context_reset() routines to function pointers that are configured when the AFU is initialized. In addition, rename the existing routines to better reflect the queue model they su

Re: [PATCH v2 06/14] cxlflash: Allocate memory instead of using command pool for AFU sync

2016-11-30 Thread Uma Krishnan
nc service is only executed from the process environment, blocking is acceptable. Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More maj

Re: [PATCH v2 05/14] cxlflash: Remove unused buffer from AFU command

2016-11-30 Thread Uma Krishnan
no longer necessary, the buffer is removed. Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 07/14] cxlflash: Use cmd_size for private commands

2016-11-30 Thread Uma Krishnan
ed private command on queuecommand and TMF paths. Remove cmd_checkout() as it is no longer required. The remaining AFU private command infrastructure will be removed in a cleanup commit. Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan -- To unsubscribe from this list: send the line &q

Re: [PATCH v2 11/14] cxlflash: Cleanup send_tmf()

2016-11-30 Thread Uma Krishnan
statements for clarity. Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 08/14] cxlflash: Remove private command pool

2016-11-30 Thread Uma Krishnan
From: "Matthew R. Ochs" Clean up and remove the remaining private command pool infrastructure that is no longer required. Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of

Re: [PATCH v2 10/14] cxlflash: Remove AFU command lock

2016-11-30 Thread Uma Krishnan
Additionally, as the simplification to the AFU internal command routine, explicit assignments of AFU command fields to zero are removed as the memory is zeroed upon allocation. Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan -- To unsubscribe from this list: send the line "unsubscribe lin

Re: [PATCH v2 09/14] cxlflash: Wait for active AFU commands to timeout upon tear down

2016-11-30 Thread Uma Krishnan
-by: Matthew R. Ochs Acked-by: Uma Krishnan -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 12/14] cxlflash: Cleanup queuecommand()

2016-11-30 Thread Uma Krishnan
nnecessary logic and create an organized flow: handle state -> DMA map -> populate command -> send command Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to m

Re: [PATCH v2 13/14] cxlflash: Migrate IOARRIN specific routines to function pointers

2016-11-30 Thread Uma Krishnan
model they support. Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 14/14] cxlflash: Migrate scsi command pointer to AFU command

2016-11-30 Thread Uma Krishnan
igrated to outside the descriptor where it can still be found during completion processing. Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More maj

[PATCH 2/4] cxlflash: Support SQ Command Mode

2017-01-06 Thread Uma Krishnan
From: "Matthew R. Ochs" The SISLite specification outlines a new queuing model to improve over the MMIO-based IOARRIN model that exists today. This new model uses a submission queue that exists in host memory and is shared with the device. Each entry in the queue is an IOARCB that describes a tra

[PATCH 1/4] cxlflash: Refactor context reset to share reset logic

2017-01-06 Thread Uma Krishnan
From: "Matthew R. Ochs" As staging for supporting hardware with different context reset registers but a similar reset procedure, refactor the existing context reset routine to move the reset logic to a common routine. This will allow hardware with a different reset register to leverage existing c

[PATCH 3/4] cxlflash: Cleanup prints

2017-01-06 Thread Uma Krishnan
From: "Matthew R. Ochs" The usage of prints within the cxlflash driver is inconsistent. This hinders debug and makes the driver source and log output appear sloppy. The following cleanups help unify the prints within cxlflash: - move all prints to dev-* where possible - transition all hex prin

[PATCH 0/4] cxlflash: Enhancements, cleanup and fixes

2017-01-06 Thread Uma Krishnan
context reset to share reset logic cxlflash: Support SQ Command Mode cxlflash: Cleanup prints Uma Krishnan (1): cxlflash: Cancel scheduled workers before stopping AFU drivers/scsi/cxlflash/common.h | 32 ++- drivers/scsi/cxlflash/lunmgt.c | 31 +-- drivers/scsi/cxlflash/main.c

[PATCH 4/4] cxlflash: Cancel scheduled workers before stopping AFU

2017-01-06 Thread Uma Krishnan
is problem and to simplify things, this commit removes the mapcount solution. Instead, the scheduled worker thread is cancelled after interrupts have been disabled and prior to the mapping being freed. Fixes: b45cdbaf9f7f ("cxlflash: Resolve oops in wait_port_offline") Signed-

Re: [PATCH 0/4] cxlflash: Enhancements, cleanup and fixes

2017-01-10 Thread Uma Krishnan
On 1/9/2017 11:00 PM, Martin K. Petersen wrote: "Uma" == Uma Krishnan writes: Uma, Uma> This patch series includes an enhancement to support a new command Uma> queuing model and also cleans up prints throughout the driver. The Uma> last patch in the series fixes a raci

[PATCH v2 0/4] cxlflash: Enhancements, cleanup and fixes

2017-01-11 Thread Uma Krishnan
submitted patches Matthew R. Ochs (3): cxlflash: Refactor context reset to share reset logic cxlflash: Support SQ Command Mode cxlflash: Cleanup prints Uma Krishnan (1): cxlflash: Cancel scheduled workers before stopping AFU drivers/scsi/cxlflash/common.h | 32 ++- drivers/scsi/cxlflash

[PATCH v2 2/4] cxlflash: Support SQ Command Mode

2017-01-11 Thread Uma Krishnan
escribes a transfer request. When requests are submitted, IOARCBs ('current' position tracked in host software) are populated and the submission queue tail pointer is then updated via MMIO to make the device aware of the requests. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishna

[PATCH v2 3/4] cxlflash: Cleanup prints

2017-01-11 Thread Uma Krishnan
on all hex prints to lowercase - standardize variable prints in debug output - derive pointers in a consistent manner - change int to bool where appropriate - remove superfluous data from prints and print statements that do not make sense Signed-off-by: Matthew R. Ochs Signed-off-by: Um

[PATCH v2 1/4] cxlflash: Refactor context reset to share reset logic

2017-01-11 Thread Uma Krishnan
e existing code. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index b17ebf6..a990efb 100644 --- a/dr

[PATCH v2 4/4] cxlflash: Cancel scheduled workers before stopping AFU

2017-01-11 Thread Uma Krishnan
is problem and to simplify things, this commit removes the mapcount solution. Instead, the scheduled worker thread is cancelled after interrupts have been disabled and prior to the mapping being freed. Fixes: b45cdbaf9f7f ("cxlflash: Resolve oops in wait_port_offline") Signed-off-by: Um

[PATCH] cxlflash: Enable PCI device ID for future IBM CXL Flash AFU

2017-02-16 Thread Uma Krishnan
From: "Matthew R. Ochs" Add support for a future IBM Coherent Accelerator (CXL) flash AFU with an ID of 0x0624. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c | 4 drivers/scsi/cxlflash/main.h | 1 + 2 files changed, 5 insertion

[PATCH 0/7] Miscellaneous patches to support cxlflash in PowerVM

2016-03-04 Thread Uma Krishnan
path error cleanup Uma Krishnan (2): cxlflash: Unmap problem state area before detaching master context cxlflash: Reorder user context initialization drivers/scsi/cxlflash/common.h| 8 +- drivers/scsi/cxlflash/main.c | 72 +++--- drivers/scsi/cxlflash/superpipe.c

[PATCH 4/7] cxlflash: Simplify attach path error cleanup

2016-03-04 Thread Uma Krishnan
From: "Matthew R. Ochs" The cxlflash_disk_attach() routine currently uses a cascading error gate strategy for its error cleanup path. While this strategy is commonly used to handle cleanup scenarios, it is too restrictive when function callouts need to be restructured. Problems range from inserti

[PATCH 7/7] cxlflash: Increase cmd_per_lun for better throughput

2016-03-04 Thread Uma Krishnan
From: "Manoj N. Kumar" With the current value of cmd_per_lun at 16, the throughput over a single adapter is limited to around 150kIOPS. Increase the value of cmd_per_lun to 256 to improve throughput. With this change a single adapter is able to attain close to the maximum throughput (380kIOPS).

[PATCH 6/7] cxlflash: Fix to avoid unnecessary scan with internal LUNs

2016-03-04 Thread Uma Krishnan
From: "Manoj N. Kumar" When switching to the internal LUN defined on the IBM CXL flash adapter, there is an unnecessary scan occurring on the second port. This scan leads to the following extra lines in the log: Dec 17 10:09:00 tul83p1 kernel: [ 3708.561134] cxlflash 0008:00:00.0: cxlflash_queu

[PATCH 3/7] cxlflash: Split out context initialization

2016-03-04 Thread Uma Krishnan
From: "Matthew R. Ochs" Presently, context information structures are allocated and initialized in the same routine, create_context(). This imposes an ordering restriction such that all pieces of information needed to initialize a context must be known before the context is even allocated. This

[PATCH 2/7] cxlflash: Unmap problem state area before detaching master context

2016-03-04 Thread Uma Krishnan
master context to be detached first and the problem state area to be unmapped second. To resolve this issue, stop_afu() should be called before term_mc(). Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH 1/7] cxlflash: Simplify PCI registration

2016-03-04 Thread Uma Krishnan
From: "Manoj N. Kumar" The calls to pci_request_regions(), pci_resource_start(), pci_set_dma_mask(), pci_set_master() and pci_save_state() are all unnecessary for the IBM CXL flash adapter since data buffers are not required to be mapped to the device's memory. The use of services such as pci_se

[PATCH 5/7] cxlflash: Reorder user context initialization

2016-03-04 Thread Uma Krishnan
process element is attached. The cxlflash module is unable to create contexts without a valid process element id. To fix this problem, cxl_start_work() is called before obtaining the process element id. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/superpipe.c | 56

Re: [PATCH 1/7] cxlflash: Simplify PCI registration

2016-03-08 Thread Uma Krishnan
On 3/4/2016 3:55 PM, Uma Krishnan wrote: From: "Manoj N. Kumar" The calls to pci_request_regions(), pci_resource_start(), pci_set_dma_mask(), pci_set_master() and pci_save_state() are all unnecessary for the IBM CXL flash adapter since data buffers are not required to be mapped to th

Re: [PATCH 3/7] cxlflash: Split out context initialization

2016-03-08 Thread Uma Krishnan
On 3/4/2016 3:55 PM, Uma Krishnan wrote: From: "Matthew R. Ochs" Presently, context information structures are allocated and initialized in the same routine, create_context(). This imposes an ordering restriction such that all pieces of information needed to initialize a context mus

Re: [PATCH 6/7] cxlflash: Fix to avoid unnecessary scan with internal LUNs

2016-03-08 Thread Uma Krishnan
On 3/4/2016 3:55 PM, Uma Krishnan wrote: From: "Manoj N. Kumar" When switching to the internal LUN defined on the IBM CXL flash adapter, there is an unnecessary scan occurring on the second port. This scan leads to the following extra lines in the log: Dec 17 10:09:00 tul8

Re: [PATCH 4/7] cxlflash: Simplify attach path error cleanup

2016-03-08 Thread Uma Krishnan
On 3/4/2016 3:55 PM, Uma Krishnan wrote: From: "Matthew R. Ochs" The cxlflash_disk_attach() routine currently uses a cascading error gate strategy for its error cleanup path. While this strategy is commonly used to handle cleanup scenarios, it is too restrictive when function callou

Re: [PATCH 7/7] cxlflash: Increase cmd_per_lun for better throughput

2016-03-08 Thread Uma Krishnan
On 3/4/2016 3:55 PM, Uma Krishnan wrote: From: "Manoj N. Kumar" With the current value of cmd_per_lun at 16, the throughput over a single adapter is limited to around 150kIOPS. Increase the value of cmd_per_lun to 256 to improve throughput. With this change a single adapter is able

[PATCH 0/2] Fix regression and performance issue in cxlflash

2016-03-23 Thread Uma Krishnan
This series has a couple of patches in cxlflash. The first patch is critical as it fixes a regression that was introduced by Commit 6ded8b3cbd9a ("cxlflash: Unmap problem state area before detaching master context") as part of the first SCSI push for v4.6. The second patch addresses a performance

[PATCH 1/2] cxlflash: Fix regression issue with re-ordering patch

2016-03-23 Thread Uma Krishnan
From: "Manoj N. Kumar" While running 'sg_reset -H' back to back the following exception was seen: [ 735.115695] Faulting instruction address: 0xd98c0864 cpu 0x0: Vector: 300 (Data Access) at [c00afa80] pc: d98c0864: cxlflash_async_err_irq+0x84/0x5c0 [cxlflash] lr

[PATCH 2/2] cxlflash: Move to exponential back-off when cmd_room is not available

2016-03-23 Thread Uma Krishnan
From: "Manoj N. Kumar" While profiling the cxlflash_queuecommand() path under a heavy load it was found that number of retries to find cmd_room was fairly high. There are two problems with the current back-off: a) It starts with a udelay of 0 b) It backs-off linearly Tried several approaches (a

[PATCH v2 0/2] Fix regression and performance issue in cxlflash

2016-03-25 Thread Uma Krishnan
This series has a couple of patches in cxlflash. The first patch is critical as it fixes a regression that was introduced by Commit 6ded8b3cbd9a ("cxlflash: Unmap problem state area before detaching master context") as part of the first SCSI push for v4.6. The second patch addresses a performance

[PATCH v2 1/2] cxlflash: Fix regression issue with re-ordering patch

2016-03-25 Thread Uma Krishnan
on process symmetric, separate the AFU interrupt setup also to a distinct function: init_intr(). Fixes: 6ded8b3cbd9a ("cxlflash: Unmap problem state area before detaching master context") Signed-off-by: Manoj N. Kumar Acked-by: Matthew R. Ochs Reviewed-by: Johannes Thumshirn Signed

[PATCH v2 2/2] cxlflash: Move to exponential back-off when cmd_room is not available

2016-03-25 Thread Uma Krishnan
are of the problem with the initial delay (starts with 1 usec). Signed-off-by: Manoj N. Kumar Acked-by: Matthew R. Ochs Reviewed-by: Johannes Thumshirn Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scs

[PATCH 0/1] cxlflash: Fix in EEH recovery

2016-05-03 Thread Uma Krishnan
This patch addresses a deadlock issue seen during EEH recovery and is intended for 4.7. Manoj N. Kumar (1): cxlflash: Fix to resolve dead-lock during EEH recovery drivers/scsi/cxlflash/superpipe.c | 15 +++ 1 file changed, 15 insertions(+) -- 2.1.0 -- To unsubscribe from this li

[PATCH 1/1] cxlflash: Fix to resolve dead-lock during EEH recovery

2016-05-03 Thread Uma Krishnan
From: "Manoj N. Kumar" When a cxlflash adapter goes into EEH recovery and multiple processes (each having established its own context) are active, the EEH recovery can hang if the processes attempt to recover in parallel. The symptom logged after a couple of minutes is: INFO: task eehd:48 blocke

[PATCH 0/6] cxlflash: Miscellaneous fixes and updates

2015-12-10 Thread Uma Krishnan
wait_port_offline cxlflash: Enable device id for future IBM CXL adapter Matthew R. Ochs (1): cxlflash: Fix to avoid virtual LUN failover failure Uma Krishnan (1): cxlflash: Updated date of the driver drivers/scsi/cxlflash/common.h | 2 ++ drivers/scsi/cxlflash/main.c | 51

[PATCH 4/6] cxlflash: Fix to resolve cmd leak after host reset

2015-12-10 Thread Uma Krishnan
From: Manoj Kumar After a few iterations of resetting the card, either during EEH recovery, or a host_reset the following is seen in the logs. cxlflash 0008:00: cxlflash_queuecommand: could not get a free command At every reset of the card, the commands that are outstanding are being leaked. No

[PATCH 5/6] cxlflash: Resolve oops in wait_port_offline

2015-12-10 Thread Uma Krishnan
From: Manoj Kumar If an async error interrupt is generated, and the error requires the FC link to be reset, it cannot be performed in the interrupt context. So a work element is scheduled to complete the link reset in a process context. If either an EEH event or an escalation occurs in between wh

[PATCH 3/6] cxlflash: Updated date of the driver

2015-12-10 Thread Uma Krishnan
This change is to update the date when last change was made to the cxlflash driver Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/cxlflash/main.h b/drivers/scsi/cxlflash/main.h index 6032456..ddc4a97

[PATCH 1/6] cxlflash: Fix to escalate LINK_RESET also on port 1

2015-12-10 Thread Uma Krishnan
From: Manoj Kumar The original fix to escalate a 'login timed out' error to a LINK_RESET was only made for one of the two ports on the card. This fix resolves the same issue for the second port (port 1). Signed-off-by: Manoj N. Kumar --- drivers/scsi/cxlflash/main.c | 2 +- 1 file changed, 1 i

[PATCH 2/6] cxlflash: Fix to avoid virtual LUN failover failure

2015-12-10 Thread Uma Krishnan
From: "Matthew R. Ochs" Applications which use virtual LUN's that are backed by a physical LUN over both adapter ports may experience an I/O failure in the event of a link loss (e.g. cable pull). Virtual LUNs may be accessed through one or both ports of the adapter. This access is encoded in the

[PATCH 6/6] cxlflash: Enable device id for future IBM CXL adapter

2015-12-10 Thread Uma Krishnan
From: Manoj Kumar This drop enables a future card with a device id of 0x0600 to be recognized by the cxlflash driver. No card specific programming has been added. These card specific changes will be staged in later. Signed-off-by: Manoj N. Kumar --- drivers/scsi/cxlflash/main.c | 3 +++ driver

Re: [PATCH 3/6] cxlflash: Updated date of the driver

2015-12-14 Thread Uma Krishnan
m the code. This should be included in the second version of the patch series. Thanks, Uma Krishnan -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH v2 0/6] cxlflash: Miscellaneous fixes and updates

2015-12-14 Thread Uma Krishnan
cxlflash: Resolve oops in wait_port_offline cxlflash: Enable device id for future IBM CXL adapter Matthew R. Ochs (1): cxlflash: Fix to avoid virtual LUN failover failure Uma Krishnan (1): cxlflash: Removed driver date print drivers/scsi/cxlflash/common.h | 2 ++ drivers/scsi/cxlflash/main.c

[PATCH v2 1/6] cxlflash: Fix to escalate LINK_RESET also on port 1

2015-12-14 Thread Uma Krishnan
From: Manoj Kumar The original fix to escalate a 'login timed out' error to a LINK_RESET was only made for one of the two ports on the card. This fix resolves the same issue for the second port (port 1). Signed-off-by: Manoj N. Kumar Acked-by: Matthew R. Ochs --- drivers/scsi/cxlflash/main.c

[PATCH v2 0/6] cxlflash: Miscellaneous fixes and updates

2015-12-14 Thread Uma Krishnan
cxlflash: Resolve oops in wait_port_offline cxlflash: Enable device id for future IBM CXL adapter Matthew R. Ochs (1): cxlflash: Fix to avoid virtual LUN failover failure Uma Krishnan (1): cxlflash: Removed driver date print drivers/scsi/cxlflash/common.h | 2 ++ drivers/scsi/cxlflash/main.c

[PATCH v2 0/6] cxlflash: Miscellaneous fixes and updates

2015-12-14 Thread Uma Krishnan
cxlflash: Resolve oops in wait_port_offline cxlflash: Enable device id for future IBM CXL adapter Matthew R. Ochs (1): cxlflash: Fix to avoid virtual LUN failover failure Uma Krishnan (1): cxlflash: Removed driver date print drivers/scsi/cxlflash/common.h | 2 ++ drivers/scsi/cxlflash/main.c

[PATCH v2 2/6] cxlflash: Fix to avoid virtual LUN failover failure

2015-12-14 Thread Uma Krishnan
From: "Matthew R. Ochs" Applications which use virtual LUN's that are backed by a physical LUN over both adapter ports may experience an I/O failure in the event of a link loss (e.g. cable pull). Virtual LUNs may be accessed through one or both ports of the adapter. This access is encoded in the

[PATCH v2 3/6] cxlflash: Removed driver date print

2015-12-14 Thread Uma Krishnan
Having a date for the driver requires it to be updated quite often. Removing the date which is not necessary. Also made use of the existing symbol to print the driver name. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c | 3 +-- drivers/scsi/cxlflash/main.h | 1 - 2 files changed

[PATCH v2 5/6] cxlflash: Resolve oops in wait_port_offline

2015-12-14 Thread Uma Krishnan
From: Manoj Kumar If an async error interrupt is generated, and the error requires the FC link to be reset, it cannot be performed in the interrupt context. So a work element is scheduled to complete the link reset in a process context. If either an EEH event or an escalation occurs in between wh

[PATCH v2 4/6] cxlflash: Fix to resolve cmd leak after host reset

2015-12-14 Thread Uma Krishnan
From: Manoj Kumar After a few iterations of resetting the card, either during EEH recovery, or a host_reset the following is seen in the logs. cxlflash 0008:00: cxlflash_queuecommand: could not get a free command At every reset of the card, the commands that are outstanding are being leaked. No

[PATCH v2 6/6] cxlflash: Enable device id for future IBM CXL adapter

2015-12-14 Thread Uma Krishnan
From: Manoj Kumar This drop enables a future card with a device id of 0x0600 to be recognized by the cxlflash driver. As per the design, the Accelerator Function Unit (AFU) for this new IBM CXL Flash Adapter retains the same host interface as the previous generation. For the early prototypes of

Re: [PATCH 1/6] cxlflash: Fix to escalate LINK_RESET also on port 1

2015-12-17 Thread Uma Krishnan
On 12/14/2015 11:30 AM, Matthew R. Ochs wrote: Acked-by: Matthew R. Ochs Reviewed-by: Uma Krishnan -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [PATCH 2/6] cxlflash: Fix to avoid virtual LUN failover failure

2015-12-17 Thread Uma Krishnan
On 12/10/2015 4:53 PM, Uma Krishnan wrote: From: "Matthew R. Ochs" Applications which use virtual LUN's that are backed by a physical LUN over both adapter ports may experience an I/O failure in the event of a link loss (e.g. cable pull). Virtual LUNs may be accessed through on

Re: [PATCH 5/6] cxlflash: Resolve oops in wait_port_offline

2015-12-17 Thread Uma Krishnan
On 12/10/2015 4:54 PM, Uma Krishnan wrote: From: Manoj Kumar If an async error interrupt is generated, and the error requires the FC link to be reset, it cannot be performed in the interrupt context. So a work element is scheduled to complete the link reset in a process context. If either an

[PATCH 0/6] cxlflash: Miscellaneous patches

2018-01-03 Thread Uma Krishnan
context cxlflash: Remove embedded CXL work structures cxlflash: Staging to support future accelerators Uma Krishnan (3): cxlflash: Reset command ioasc cxlflash: Update cxl-specific arguments to generic cookie cxlflash: Adapter context init can return error drivers/scsi/cxlflash/Makefile

[PATCH 2/6] cxlflash: Update cxl-specific arguments to generic cookie

2018-01-03 Thread Uma Krishnan
Convert cxl-specific pointers to generic cookies to facilitate future enhancements. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/common.h| 4 ++-- drivers/scsi/cxlflash/main.c | 38 +++--- drivers/scsi/cxlflash/superpipe.c | 15

[PATCH 1/6] cxlflash: Reset command ioasc

2018-01-03 Thread Uma Krishnan
("scsi: cxlflash: Remove zeroing of private command data") Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index 38b3a9c..48d3663 100644 --- a/drivers/scsi/cxlfl

[PATCH 3/6] cxlflash: Explicitly cache number of interrupts per context

2018-01-03 Thread Uma Krishnan
(CXL) will only complicate matters when supporting newer accelerator transports. Instead of relying upon the number of interrupts being cached within a CXL-specific structure, explicitly cache the value within the context information structure. Signed-off-by: Matthew R. Ochs Signed-off-by: Um

[PATCH 4/6] cxlflash: Remove embedded CXL work structures

2018-01-03 Thread Uma Krishnan
layer when starting a context. To facilitate staging that will ultimately allow the cxlflash core to become agnostic of the underlying accelerator transport, remove these embedded work structures. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/common

[PATCH 5/6] cxlflash: Adapter context init can return error

2018-01-03 Thread Uma Krishnan
Adapter context creation can return either NULL or an error pointer. Updating the check condition to reflect this. Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi

  1   2   3   4   >