From: Sumit Saxena <sumit.saxena@avagotech.com> To: jbottomley@parallels.com, hch@infradead.org, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, kashyap.desai@avagotech.com, sumit.saxena@avagotech.com Subject: [PATCH 06/15] megaraid_sas: Fastpath region lock bypass Date: Fri, 18 Dec 2015 18:56:59 +0530 [thread overview] Message-ID: <1450445228-26571-7-git-send-email-Sumit.Saxena@avagotech.com> (raw) In-Reply-To: <1450445228-26571-1-git-send-email-Sumit.Saxena@avagotech.com> Firmware will fill per LD data to tell driver that particular LD supports Region lock bypass or not. If yes, then Driver will send non FP LDIO to region lock bypass FIFO. With this change in driver, firmware will optimize certain code to improve performance. Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com> Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> --- drivers/scsi/megaraid/megaraid_sas.h | 8 ++++++-- drivers/scsi/megaraid/megaraid_sas_fp.c | 2 ++ drivers/scsi/megaraid/megaraid_sas_fusion.c | 6 ++++-- drivers/scsi/megaraid/megaraid_sas_fusion.h | 8 +++++--- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 773fc54..01135be 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h @@ -1528,7 +1528,9 @@ union megasas_sgl_frame { typedef union _MFI_CAPABILITIES { struct { #if defined(__BIG_ENDIAN_BITFIELD) - u32 reserved:23; + u32 reserved:21; + u32 support_fp_rlbypass:1; + u32 support_vfid_in_ioframe:1; u32 support_ext_io_size:1; u32 support_ext_queue_depth:1; u32 security_protocol_cmds_fw:1; @@ -1548,7 +1550,9 @@ typedef union _MFI_CAPABILITIES { u32 security_protocol_cmds_fw:1; u32 support_ext_queue_depth:1; u32 support_ext_io_size:1; - u32 reserved:23; + u32 support_vfid_in_ioframe:1; + u32 support_fp_rlbypass:1; + u32 reserved:21; #endif } mfi_capabilities; __le32 reg; diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c index 741509b..e413113 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fp.c +++ b/drivers/scsi/megaraid/megaraid_sas_fp.c @@ -1020,6 +1020,8 @@ MR_BuildRaidContext(struct megasas_instance *instance, /* assume this IO needs the full row - we'll adjust if not true */ regSize = stripSize; + io_info->do_fp_rlbypass = raid->capability.fpBypassRegionLock; + /* Check if we can send this I/O via FastPath */ if (raid->capability.fpCapable) { if (isRead) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 0b31f5a..e8730ef 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -666,6 +666,8 @@ megasas_ioc_init_fusion(struct megasas_instance *instance) if (instance->max_chain_frame_sz > MEGASAS_CHAIN_FRAME_SZ_MIN) drv_ops->mfi_capabilities.support_ext_io_size = 1; + drv_ops->mfi_capabilities.support_fp_rlbypass = 1; + /* Convert capability to LE32 */ cpu_to_le32s((u32 *)&init_frame->driver_operations.mfi_capabilities); @@ -1710,8 +1712,8 @@ megasas_build_ldio_fusion(struct megasas_instance *instance, (MEGASAS_REQ_DESCRIPT_FLAGS_LD_IO << MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); if (fusion->adapter_type == INVADER_SERIES) { - if (io_request->RaidContext.regLockFlags == - REGION_TYPE_UNUSED) + if (io_info.do_fp_rlbypass || + (io_request->RaidContext.regLockFlags == REGION_TYPE_UNUSED)) cmd->request_desc->SCSIIO.RequestFlags = (MEGASAS_REQ_DESCRIPT_FLAGS_NO_LOCK << MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.h b/drivers/scsi/megaraid/megaraid_sas_fusion.h index a1f1c0b..db0978d 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.h +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.h @@ -643,7 +643,8 @@ struct MR_SPAN_BLOCK_INFO { struct MR_LD_RAID { struct { #if defined(__BIG_ENDIAN_BITFIELD) - u32 reserved4:6; + u32 reserved4:5; + u32 fpBypassRegionLock:1; u32 tmCapable:1; u32 fpNonRWCapable:1; u32 fpReadAcrossStripe:1; @@ -667,7 +668,8 @@ struct MR_LD_RAID { u32 fpReadAcrossStripe:1; u32 fpNonRWCapable:1; u32 tmCapable:1; - u32 reserved4:6; + u32 fpBypassRegionLock:1; + u32 reserved4:5; #endif } capability; __le32 reserved6; @@ -737,7 +739,7 @@ struct IO_REQUEST_INFO { u8 fpOkForIo; u8 IoforUnevenSpan; u8 start_span; - u8 reserved; + u8 do_fp_rlbypass; u64 start_row; u8 span_arm; /* span[7:5], arm[4:0] */ u8 pd_after_lb; -- 1.7.1
next prev parent reply other threads:[~2015-12-18 13:28 UTC|newest] Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-12-18 13:26 [PATCH 00/15] megaraid_sas: Updates for scsi-next Sumit Saxena 2015-12-18 13:26 ` [PATCH 01/15] megaraid_sas: Do not allow PCI access during OCR Sumit Saxena 2016-01-11 17:02 ` Tomas Henzl 2015-12-18 13:26 ` [PATCH 02/15] megaraid_sas: MFI IO timeout handling Sumit Saxena 2016-01-11 17:02 ` Tomas Henzl 2015-12-18 13:26 ` [PATCH 03/15] megaraid_sas: Syncing request flags macro names with firmware Sumit Saxena 2016-01-11 17:03 ` Tomas Henzl 2015-12-18 13:26 ` [PATCH 04/15] megaraid_sas: Task management support Sumit Saxena 2016-01-11 17:03 ` Tomas Henzl 2016-01-14 12:04 ` Sumit Saxena 2015-12-18 13:26 ` [PATCH 05/15] megaraid_sas: Update device Queue depth based on interface type Sumit Saxena 2016-01-12 14:16 ` Tomas Henzl 2016-01-14 11:48 ` Sumit Saxena 2015-12-18 13:26 ` Sumit Saxena [this message] 2016-01-12 14:44 ` [PATCH 06/15] megaraid_sas: Fastpath region lock bypass Tomas Henzl 2015-12-18 13:27 ` [PATCH 07/15] megaraid_sas: Reply Descriptor Post Queue(RDPQ) support Sumit Saxena 2015-12-18 14:49 ` [PATCH] megaraid_sas: fix kzalloc-simple.cocci warnings kbuild test robot 2015-12-18 14:49 ` [PATCH 07/15] megaraid_sas: Reply Descriptor Post Queue(RDPQ) support kbuild test robot 2016-01-14 17:38 ` Tomas Henzl 2016-01-27 18:15 ` Sumit Saxena 2015-12-18 13:27 ` [PATCH 08/15] megaraid_sas: Code optimization build_and_issue_cmd return-type Sumit Saxena 2016-01-14 18:05 ` Tomas Henzl 2015-12-18 13:27 ` [PATCH 09/15] megaraid_sas: Dual Queue depth support Sumit Saxena 2016-01-19 13:34 ` Tomas Henzl 2016-01-19 13:44 ` Sumit Saxena 2016-01-20 13:55 ` Tomas Henzl 2016-01-20 14:09 ` Sumit Saxena 2016-01-20 14:16 ` Tomas Henzl 2016-01-20 15:08 ` Sumit Saxena 2016-01-20 16:00 ` Tomas Henzl 2016-01-27 2:02 ` Martin K. Petersen 2016-01-27 7:09 ` Sumit Saxena 2015-12-18 13:27 ` [PATCH 10/15] megaraid_sas: IO throttling support Sumit Saxena 2016-01-19 13:38 ` Tomas Henzl 2016-01-28 7:18 ` Sumit Saxena 2015-12-18 13:27 ` [PATCH 11/15] megaraid_sas: Make adprecovery variable atomic Sumit Saxena 2016-01-19 13:52 ` Tomas Henzl 2016-01-28 8:30 ` Sumit Saxena 2015-12-18 13:27 ` [PATCH 12/15] megaraid_sas: MFI adapter's OCR changes Sumit Saxena 2016-01-19 14:22 ` Tomas Henzl 2016-01-28 11:12 ` Sumit Saxena 2015-12-18 13:27 ` [PATCH 13/15] megaraid_sas: Introduce module parameter for SCSI command-timeout Sumit Saxena 2016-01-19 14:57 ` Tomas Henzl 2016-01-28 11:17 ` Sumit Saxena 2015-12-18 13:27 ` [PATCH 14/15] megaraid_sas: SPERC OCR changes Sumit Saxena 2016-01-19 15:14 ` Tomas Henzl 2015-12-18 13:27 ` [PATCH 15/15] megaraid_sas: SPERC boot driver reorder Sumit Saxena 2015-12-18 14:05 ` Christoph Hellwig 2016-01-08 7:07 ` Sumit Saxena 2016-01-12 5:26 ` Sumit Saxena
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1450445228-26571-7-git-send-email-Sumit.Saxena@avagotech.com \ --to=sumit.saxena@avagotech.com \ --cc=hch@infradead.org \ --cc=jbottomley@parallels.com \ --cc=kashyap.desai@avagotech.com \ --cc=linux-scsi@vger.kernel.org \ --cc=martin.petersen@oracle.com \ --subject='Re: [PATCH 06/15] megaraid_sas: Fastpath region lock bypass' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.