RE: Observing Softlockup's while running heavy IOs

2016-08-19 Thread Elliott, Robert (Persistent Memory)
> -Original Message- > From: Sreekanth Reddy [mailto:sreekanth.re...@broadcom.com] > Sent: Friday, August 19, 2016 6:45 AM > To: Elliott, Robert (Persistent Memory) > Subject: Re: Observing Softlockup's while running heavy IOs > ... > Yes I am also observing that all the interrupts are

Re: [PATCH v2] fcoe: provide translation table between Ethernet and FC port speeds

2016-08-19 Thread Lee Duncan
On 08/19/2016 06:33 AM, Johannes Thumshirn wrote: > Provide a translation table between Ethernet and FC port speeds so odd > speeds (from a Ethernet POV) like 8 Gbit are correctly mapped to sysfs > and open-fcoe's fcoeadm. > > Before: > Description: BCM57840 NetXtreme II 10/20-Gigabit Eth

[PATCH 2/2] scsi: sg: Use mult_frac, drop MULDIV macro

2016-08-19 Thread Paul Burton
The MULDIV macro is essentially a duplicate of the more standard mult_frac macro. Replace use of MULDIV with mult_frac & drop the duplication. Signed-off-by: Paul Burton --- drivers/scsi/sg.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/sg

[PATCH 1/2] scsi: sg: Avoid overflow when USER_HZ > HZ

2016-08-19 Thread Paul Burton
Calculating the maximum timeout that a user can set via the SG_SET_TIMEOUT ioctl involves multiplying INT_MAX by USER_HZ/HZ. If USER_HZ is larger than HZ then this results in an overflow when performed as a 32 bit integer calculation, resulting in compiler warnings such as the following: drivers

Re: Oops when completing request on the wrong queue

2016-08-19 Thread Gabriel Krisman Bertazi
Jens Axboe writes: >> Some good detective work so far! I agree, this looks like a blk-mq core >> bug. Do you have a trace of a BUG() triggering in nvme_queue_rq(), when >> req->tag != nvmeq->tags? I don't immediately see how this could happen, >> the freezing should protect us from this, unless i

Re: Observing Softlockup's while running heavy IOs

2016-08-19 Thread Bart Van Assche
On 08/19/2016 04:44 AM, Sreekanth Reddy wrote: [ +0.000439] __blk_mq_run_hw_queue() finished after 10058 ms [ ... ] [ +0.05] [] ? finish_task_switch+0x6b/0x200 [ +0.06] [] __schedule+0x36c/0x950 [ +0.02] [] schedule+0x37/0x80 [ +0.06] [] futex_wait_queue_me+0xbc/0x120 [

Re: Oops when completing request on the wrong queue

2016-08-19 Thread Jens Axboe
On 08/19/2016 08:13 AM, Jens Axboe wrote: On 08/19/2016 07:28 AM, Gabriel Krisman Bertazi wrote: Gabriel Krisman Bertazi writes: We, IBM, have been experiencing eventual Oops when stressing IO at the same time we add/remove processors. The Oops happens in the IRQ path, when we try to complet

[GIT PULL] SCSI fixes for 4.8-rc2

2016-08-19 Thread James Bottomley
Six fairly small fixes. The ipr, mpt3sas and ses ones all trigger oopses. The megaraid one fixes an attach failure on io mapped only cards, the fcoe one is an obvious problem in the error path and the aacraid one is a theoretical security issue (ability to trick the kernel into a buffer overrun).

Re: Oops when completing request on the wrong queue

2016-08-19 Thread Jens Axboe
On 08/19/2016 07:28 AM, Gabriel Krisman Bertazi wrote: Gabriel Krisman Bertazi writes: We, IBM, have been experiencing eventual Oops when stressing IO at the same time we add/remove processors. The Oops happens in the IRQ path, when we try to complete a request that was apparently meant for a

[PATCH v2] fcoe: provide translation table between Ethernet and FC port speeds

2016-08-19 Thread Johannes Thumshirn
Provide a translation table between Ethernet and FC port speeds so odd speeds (from a Ethernet POV) like 8 Gbit are correctly mapped to sysfs and open-fcoe's fcoeadm. Before: Description: BCM57840 NetXtreme II 10/20-Gigabit Ethernet Revision: 11 Manufacturer: Broadcom

Re: Oops when completing request on the wrong queue

2016-08-19 Thread Gabriel Krisman Bertazi
Gabriel Krisman Bertazi writes: > We, IBM, have been experiencing eventual Oops when stressing IO at the > same time we add/remove processors. The Oops happens in the IRQ path, > when we try to complete a request that was apparently meant for another > queue. > > In __nvme_process_cq, the driver

Re: [PATCH 5/6] cxlflash: Remove adapter file descriptor cache

2016-08-19 Thread Manoj Kumar
Acked-by: Manoj N. Kumar On 8/9/2016 6:40 PM, Matthew R. Ochs wrote: The adapter file descriptor was previously cached within the kernel for a given context in order to support performing a close on behalf of an application. This is no longer needed as applications are now required to perform

Re: [PATCH 6/6] cxlflash: Update documentation

2016-08-19 Thread Manoj Kumar
Acked-by: Manoj N. Kumar On 8/9/2016 6:40 PM, Matthew R. Ochs wrote: Update the block library link in the API documentation. Signed-off-by: Matthew R. Ochs --- Documentation/powerpc/cxlflash.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/powerpc/cxlfla

Re: [PATCH] fcoe: provide translation table between Ethernet and FC port speeds

2016-08-19 Thread Johannes Thumshirn
On Fri, Aug 19, 2016 at 10:37:04AM +0200, Hannes Reinecke wrote: > On 08/15/2016 05:24 PM, Johannes Thumshirn wrote: [...] > > > > +static const struct { > > + u32 fc_port_speed; > > + u32 eth_port_speed; > > +} fcoe_port_speed_mapping[] = { > > + { FC_PORTSPEED_1GBIT, SPEED_1000 }, > > +

Re: Observing Softlockup's while running heavy IOs

2016-08-19 Thread Sreekanth Reddy
First of all thanks for Robert and Bart for reply. Robert, Thanks for the URL, I have gone though this URL. Yes I am also observing that all the interrupts are routed to one CPU. But still I observing softlockups (sometime hardlockups) even when I set rq_affinity to 2. Is their any way to route t

[PATCH] scsi:Prevent deletion of SCSI block device in use

2016-08-19 Thread Vasundhara Gurunath
SCSI block device can be removed, using write to sysfs delete file as below: echo 1 > /sys/block/sdX/device/delete If the device is in use by applications, or part of system configuration such as boot device, removal can result in application disruptions or system down time. An additional write op

[PATCH v2 22/29] be2iscsi: Fail the sessions immediately after TPE

2016-08-19 Thread Jitendra Bhivare
Sessions are no longer valid, so schedule sess_work to fail the sessions immediately when error is detected. This is done to avoid iSCSI transport layer to keep sending NOP-Out which driver any ways fail. Schedule sess_work immediately in case of HBA error. Old sessions are gone for good and need

[PATCH v2 23/29] be2iscsi: Add FUNCTION_RESET during driver unload

2016-08-19 Thread Jitendra Bhivare
Driver unload should call COMMON_FUNCTION_RESET. For TPE feature, this ensures that FW has knowledge about driver getting unloaded and can reset its bit vector. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be_cmds.c | 2 +- drivers/scsi/be2iscsi/be_cmds

[PATCH v2 09/29] be2iscsi: Rename iface get/set/create/destroy APIs

2016-08-19 Thread Jitendra Bhivare
Rename mgmt_get_if_info to be consistent with APIs name. Rename create/destroy APIs to indicate IFACE operations. Remove legacy be2iscsi and use beiscsi. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be_iscsi.c | 42 --

[PATCH v2 27/29] be2iscsi: Update copyright information

2016-08-19 Thread Jitendra Bhivare
Change the copyright to: Copyright © - 2016 Broadcom Update email.ids: @avagotech.com - @broadcom.com Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be.h | 4 ++-- drivers/scsi/be2iscsi/be_cmds.c | 4 ++-- drivers/scsi/be2iscsi/be_cmds.h | 4

[PATCH v2 06/29] be2iscsi: Fix release of DHCP IP in static mode

2016-08-19 Thread Jitendra Bhivare
If BOOTPROTO is changed to static, the DHCP IP address should be released. All cases are being handled mgmt_set_ip and mgmt_static_ip_modify. Rearrange IFACE APIs to: beiscsi_if_clr_ip beiscsi_if_set_ip beiscsi_if_en_static beiscsi_if_en_dhcp This simplifies release of DHCP IP when BOOTPROTO is s

[PATCH v2 28/29] be2iscsi: Update the driver version

2016-08-19 Thread Jitendra Bhivare
Driver version: 11.2.0.0 Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be_main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h index 7173c03..6376657 100644 --- a/dri

[PATCH v2 26/29] be2iscsi: Fix queue and connection parameters

2016-08-19 Thread Jitendra Bhivare
Current EQ delay is set to 0 to receive very high max interrupt per sec. Set EQ delay to 32 - reducing max interrupt rate from 65K to 20K per sec. Set TCP connection window size to 64K with scale shift count 2. Signed-off-by: Jitendra Bhivare --- drivers/scsi/be2iscsi/be_main.c | 2 +- drivers/

[PATCH v2 16/29] be2iscsi: Fix to add timer for UE detection

2016-08-19 Thread Jitendra Bhivare
UE detection in health check is done in a work scheduled in global wq. UE caused due to transient parity errors are recoverable and reported within 1s. If this check for TPE gets delayed, PF0 might initiate soft-reset and then status of UE recoverable is lost. Handle UE detection in timer routine.

[PATCH v2 25/29] be2iscsi: Fix bad WRB index error

2016-08-19 Thread Jitendra Bhivare
In very rare scenario, connection gets killed after throwing this error: scsi host0: BM_2312 : Event CXN_KILLED_BAD_WRB_INDEX_ERROR[15]... CID : 4 connection1:0: detected conn error (1011) memset ISCSI_WRB descriptor to zero for all allocations of WRB handle. Signed-off-by: Jitendra Bhivare ---

[PATCH v2 08/29] be2iscsi: Update iface handle before any set param

2016-08-19 Thread Jitendra Bhivare
Move mgmt_get_all_if_id before any set param operation. Rename mgmt_get_all_if_id to beiscsi_if_get_handle. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be_iscsi.c | 29 +++--- drivers/scsi/be2iscsi/be_main.c | 30 +++ drivers/scsi/

[PATCH v2 29/29] MAINTAINERS: Update be2iscsi contact info

2016-08-19 Thread Jitendra Bhivare
Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- MAINTAINERS | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 5f50224..fec431c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10562,12 +10562,12 @@ S:Maintained F:

[PATCH v2 18/29] be2iscsi: Move functions to right files

2016-08-19 Thread Jitendra Bhivare
beiscsi_fail_session is defined in be_cmds.c: move it to be_iscsi.c Move card configuration commands to be_cmds.c. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be_cmds.c | 274 +-- drivers/scsi/be2iscsi/be_cmds.h |

[PATCH v2 20/29] be2iscsi: Add V1 of EPFW cleanup IOCTL

2016-08-19 Thread Jitendra Bhivare
mgmt_epfw_cleanup does not implement v1 of OPCODE_COMMON_ISCSI_CLEANUP IOCTL for SkyHawk. Replace use of MCCQ with BMBX for issuing the IOCTL. Remove be_mcc_compl_poll which is no longer needed. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be_cmds.c |

[PATCH v2 19/29] be2iscsi: Fix POST check and reset sequence

2016-08-19 Thread Jitendra Bhivare
SLIPORT FUNCTION_RESET does not reset the chip. So POST status needs to be checked before issuing FUNCTION_RESET. The completion of FUNCTION_RESET is indicated in BMBX Rdy bit. be_cmd_fw_initialize too needs to be done before issuing any cmd to FW. be_cmd_fw_initialize is renamed as beiscsi_cmd_sp

[PATCH v2 15/29] be2iscsi: Fix to make boot discovery non-blocking

2016-08-19 Thread Jitendra Bhivare
Boot work involves: 1. Find and fetch configured boot session and its handle. 2. Attempt to open the session if its not. 3. Get the session details for boot kset creation. 4. Logout of that session owned by FW. 5. Create boot kset for session details. All these actions were done in blocking call w

[PATCH v2 17/29] be2iscsi: Add IOCTL to check UER supported

2016-08-19 Thread Jitendra Bhivare
BE3 and SH cards can recover from transient parity errors treated earlier as unrecoverable errors. Add IOCTL to query FW support for this feature. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be_cmds.c | 58 +++-- dr

[PATCH v2 11/29] be2iscsi: Check all zeroes IP before issuing IOCTL

2016-08-19 Thread Jitendra Bhivare
Redefine FW IP types. Before issuing IOCTL to clear IP, check if IP is all zeroes. All zeroes IP implies IP is not set in FW so FW fails that IOCTL. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be_cmds.h | 8 + drivers/scsi/be2iscsi/be_iscsi.c | 2

[PATCH v2 21/29] be2iscsi: Add TPE recovery feature

2016-08-19 Thread Jitendra Bhivare
After UE is detected, check for recoverable error by reading SLIPORT SEMAPHORE register. If transient parity error i.e. 0xExxx then schedule recovery work on driver wq. FLag this error to prevent any transactions for the duration of ue2rp to restart polling. After that, if FW becomes ready then re

[PATCH v2 24/29] be2iscsi: Fix async PDU handling path

2016-08-19 Thread Jitendra Bhivare
BUG: unable to handle kernel NULL pointer dereference at 015e IP: [] hwi_get_async_handle.isra.23.constprop.39+0x90/0x1d0 [be2iscsi] PGD 0 Oops: [#1] SMP ... Call Trace: [] hwi_process_default_pdu_ring+0x7c/0x280 [be2iscsi] [] beiscsi_process_cq+0x321/0xb90 [be2iscsi] [] ? __w

[PATCH v2 07/29] be2iscsi: Move VLAN code to common iface_set_param

2016-08-19 Thread Jitendra Bhivare
VLAN tag is L2 construct, move VLAN code out from configuring IP. Rearrange and rename the APIs to make it consistent. Replace ENOSYS with EPERM. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be_iscsi.c | 89 driv

[PATCH v2 10/29] be2iscsi: Handle only NET_PARAM in iface_get_param

2016-08-19 Thread Jitendra Bhivare
Wrong settings displayed for iface: iface.header_digest = 192.168.197.22 iface.data_digest = 255.255.255.0 iface.immediate_data = 192.168.197.1 Process ISCSI_NET_PARAM only in beiscsi_iface_get_param. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be_isc

[PATCH v2 03/29] be2iscsi: Reduce driver load/unload time

2016-08-19 Thread Jitendra Bhivare
Driver takes significant time to load 1m:20s and unload 40s. Checkpatch script threw warning: WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt To eliminate this warning msleep(1) was replaced with msleep(20) before submitting. msleep(20) in init and unin

[PATCH v2 12/29] be2iscsi: Remove alloc_mcc_tag & beiscsi_pci_soft_reset

2016-08-19 Thread Jitendra Bhivare
alloc_mcc_tag was replaced with alloc_mcc_wrb and is no more used. beiscsi_pci_soft_reset is not used at all and won't be needed. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be_cmds.c | 76 - drivers/scsi/be2iscs

[PATCH v2 14/29] be2iscsi: Fix checks for HBA in error state

2016-08-19 Thread Jitendra Bhivare
Save ue_detected and fw_timeout errors in state field of beiscsi_hba. BEISCSI_HBA_RUNNING BEISCSI_HBA_LINK_UP BEISCSI_HBA_BOOT_FOUND BEISCSI_HBA_PCI_ERR BEISCSI_HBA_FW_TIMEOUT BEISCSI_HBA_IN_UE Make sure no PCI transaction happens once in error state. Add checks in IO path to detect HBA in error.

[PATCH v2 05/29] be2iscsi: Fix gateway APIs to support IPv4 & IPv6

2016-08-19 Thread Jitendra Bhivare
Gateway APIs assume IP type as IPv4. Modify it to be generic to allow clearing of IPv6 gateway set using BIOS. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be_iscsi.c | 4 +- drivers/scsi/be2iscsi/be_mgmt.c | 124 ++---

[PATCH v2 01/29] be2iscsi: Fix to use correct configuration values

2016-08-19 Thread Jitendra Bhivare
Following configuration is created with what driver exports: iface.vlan_id = 65535 iface.vlan_priority = 255 iface.vlan_state = vlan_state is empty as iscsiadm doesn't process "Disabled". When applying this configuration, iscsiadm checks for if vlan_state is "disable" if not it enables with value

[PATCH v2 02/29] be2iscsi: Replace _bh version for mcc_lock spinlock

2016-08-19 Thread Jitendra Bhivare
This got unnecessarily introduced with other changes in previous commits. mcc_lock is taken only in process contexts. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be_cmds.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/driv

[PATCH v2 00/29] be2iscsi: driver update 11.2.0.0

2016-08-19 Thread Jitendra Bhivare
This patch is generated against for-next branch. v2 changes: Removed - be2iscsi: Replace _bh with _irqsave/irqrestore This will be sent in separate patch-set. Added - be2iscsi: Fix bad WRB index error - be2iscsi: Fix queue and connection parameters Jitendra Bhi

[PATCH v2 04/29] be2iscsi: Set and return right iface v4/v6 states

2016-08-19 Thread Jitendra Bhivare
ipv4_iface and ipv6_iface fields need to be set to NULL when destroyed. Before creation these are checked. Use these to report correct states. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be_iscsi.c | 31 +-- 1 file changed,

[PATCH v2 13/29] be2iscsi: Remove isr_lock and dead code

2016-08-19 Thread Jitendra Bhivare
todo_mcc_cq is not needed as only MCC work is queued. todo_cq is not used at all. Rename functions to be consistent. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be.h | 2 +- drivers/scsi/be2iscsi/be_main.c | 132 +++--

Re: [PATCH] fcoe: provide translation table between Ethernet and FC port speeds

2016-08-19 Thread Hannes Reinecke
On 08/15/2016 05:24 PM, Johannes Thumshirn wrote: > Provide a translation table between Ethernet and FC port speeds so odd > speeds (from a Ethernet POV) like 8 Gbit are correctly mapped to sysfs > and open-fcoe's fcoeadm. > > Before: > Description: BCM57840 NetXtreme II 10/20-Gigabit Eth

[PATCH] Remove the unnecessary semicolons

2016-08-19 Thread Chao Fan
From: Vidos Fan At the end of funcions, semicolons are unnecessary. So drop them. Signed-off-by: Vidos Fan --- drivers/scsi/virtio_scsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 7dbbb29..9632a0c 100