Re: [PATCH 01/39] Revert "scsi: megaraid_sas: Enable or Disable Fast path based on the PCI Threshold Bandwidth"

2017-02-06 Thread Tomas Henzl
On 6.2.2017 10:59, Shivasharan S wrote:
> This reverts
> commit "3e5eadb1a881" ("scsi: megaraid_sas: Enable or Disable Fast path based 
> on the PCI Threshold Bandwidth")
>
> This patch was aimed to increase performance of R1 Write operation for large 
> IO size.
> Since this method used timer approach, it turn on/off fast path did not work 
> as expected.
> Patch 0011 describes new algorithm and performance number.
>
> Signed-off-by: Shivasharan S 
> Signed-off-by: Kashyap Desai 

Reviewed-by: Tomas Henzl 

Tomas



Re: [PATCH 01/39] Revert "scsi: megaraid_sas: Enable or Disable Fast path based on the PCI Threshold Bandwidth"

2017-02-06 Thread Hannes Reinecke
On 02/06/2017 10:59 AM, Shivasharan S wrote:
> This reverts
> commit "3e5eadb1a881" ("scsi: megaraid_sas: Enable or Disable Fast path based 
> on the PCI Threshold Bandwidth")
> 
> This patch was aimed to increase performance of R1 Write operation for large 
> IO size.
> Since this method used timer approach, it turn on/off fast path did not work 
> as expected.
> Patch 0011 describes new algorithm and performance number.
> 
> Signed-off-by: Shivasharan S 
> Signed-off-by: Kashyap Desai 
> ---
>  drivers/scsi/megaraid/megaraid_sas.h|  8 -
>  drivers/scsi/megaraid/megaraid_sas_base.c   | 48 
> -
>  drivers/scsi/megaraid/megaraid_sas_fp.c |  7 -
>  drivers/scsi/megaraid/megaraid_sas_fusion.c | 16 --
>  drivers/scsi/megaraid/megaraid_sas_fusion.h |  2 +-
>  5 files changed, 7 insertions(+), 74 deletions(-)
> 
Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
-- 
Dr. Hannes ReineckezSeries & Storage
h...@suse.com  +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)


RE: [PATCH 01/39] Revert "scsi: megaraid_sas: Enable or Disable Fast path based on the PCI Threshold Bandwidth"

2017-02-06 Thread Shivasharan Srikanteshwara
> -Original Message-
> From: Shivasharan S [mailto:shivasharan.srikanteshw...@broadcom.com]
> Sent: Monday, February 06, 2017 3:30 PM
> To: linux-scsi@vger.kernel.org
> Cc: martin.peter...@oracle.com; the...@redhat.com;
> j...@linux.vnet.ibm.com; kashyap.de...@broadcom.com;
> sumit.sax...@broadcom.com; h...@suse.com; Shivasharan S
> Subject: [PATCH 01/39] Revert "scsi: megaraid_sas: Enable or Disable
Fast path
> based on the PCI Threshold Bandwidth"
>
> This reverts
> commit "3e5eadb1a881" ("scsi: megaraid_sas: Enable or Disable Fast path
based
> on the PCI Threshold Bandwidth")
>
> This patch was aimed to increase performance of R1 Write operation for
large
> IO size.
> Since this method used timer approach, it turn on/off fast path did not
work as
> expected.
> Patch 0011 describes new algorithm and performance number.


Correction: Please refer patch #0012 - "megaraid_sas: raid 1 write
performance for large io"
>
> Signed-off-by: Shivasharan S <shivasharan.srikanteshw...@broadcom.com>
> Signed-off-by: Kashyap Desai <kashyap.de...@broadcom.com>
> ---


[PATCH 01/39] Revert "scsi: megaraid_sas: Enable or Disable Fast path based on the PCI Threshold Bandwidth"

2017-02-06 Thread Shivasharan S
This reverts
commit "3e5eadb1a881" ("scsi: megaraid_sas: Enable or Disable Fast path based 
on the PCI Threshold Bandwidth")

This patch was aimed to increase performance of R1 Write operation for large IO 
size.
Since this method used timer approach, it turn on/off fast path did not work as 
expected.
Patch 0011 describes new algorithm and performance number.

Signed-off-by: Shivasharan S 
Signed-off-by: Kashyap Desai 
---
 drivers/scsi/megaraid/megaraid_sas.h|  8 -
 drivers/scsi/megaraid/megaraid_sas_base.c   | 48 -
 drivers/scsi/megaraid/megaraid_sas_fp.c |  7 -
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 16 --
 drivers/scsi/megaraid/megaraid_sas_fusion.h |  2 +-
 5 files changed, 7 insertions(+), 74 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas.h 
b/drivers/scsi/megaraid/megaraid_sas.h
index ba9fbb7..f5c4742 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -1477,8 +1477,6 @@ enum FW_BOOT_CONTEXT {
 #define MFI_1068_FW_HANDSHAKE_OFFSET   0x64
 #define MFI_1068_FW_READY  0x
 
-#define MEGASAS_RAID1_FAST_PATH_STATUS_CHECK_INTERVAL HZ
-
 #define MR_MAX_REPLY_QUEUES_OFFSET  0X001F
 #define MR_MAX_REPLY_QUEUES_EXT_OFFSET  0X003FC000
 #define MR_MAX_REPLY_QUEUES_EXT_OFFSET_SHIFT14
@@ -2154,10 +2152,6 @@ struct megasas_instance {
atomic_t ldio_outstanding;
atomic_t fw_reset_no_pci_access;
 
-   atomic64_t bytes_wrote; /* used for raid1 fast path enable or disable */
-   atomic_t r1_write_fp_capable;
-
-
struct megasas_instance_template *instancet;
struct tasklet_struct isr_tasklet;
struct work_struct work_init;
@@ -2199,7 +2193,6 @@ struct megasas_instance {
long reset_flags;
struct mutex reset_mutex;
struct timer_list sriov_heartbeat_timer;
-   struct timer_list r1_fp_hold_timer;
char skip_heartbeat_timer_del;
u8 requestorId;
char PlasmaFW111;
@@ -2216,7 +2209,6 @@ struct megasas_instance {
bool is_ventura;
bool msix_combined;
u16 max_raid_mapsize;
-   u64 pci_threshold_bandwidth; /* used to control the fp writes */
 };
 struct MR_LD_VF_MAP {
u32 size;
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c 
b/drivers/scsi/megaraid/megaraid_sas_base.c
index 70891a7..3ed876a 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -1940,9 +1940,6 @@ void megaraid_sas_kill_hba(struct megasas_instance 
*instance)
}
/* Complete outstanding ioctls when adapter is killed */
megasas_complete_outstanding_ioctls(instance);
-   if (instance->is_ventura)
-   del_timer_sync(>r1_fp_hold_timer);
-
 }
 
  /**
@@ -2441,24 +2438,6 @@ void megasas_sriov_heartbeat_handler(unsigned long 
instance_addr)
}
 }
 
-/*Handler for disabling/enabling raid 1 fast paths*/
-void megasas_change_r1_fp_status(unsigned long instance_addr)
-{
-   struct megasas_instance *instance =
-   (struct megasas_instance *)instance_addr;
-   if (atomic64_read(>bytes_wrote) >=
-   instance->pci_threshold_bandwidth) {
-
-   atomic64_set(>bytes_wrote, 0);
-   atomic_set(>r1_write_fp_capable, 0);
-   } else {
-   atomic64_set(>bytes_wrote, 0);
-   atomic_set(>r1_write_fp_capable, 1);
-   }
-   mod_timer(>r1_fp_hold_timer,
-jiffies + MEGASAS_RAID1_FAST_PATH_STATUS_CHECK_INTERVAL);
-}
-
 /**
  * megasas_wait_for_outstanding -  Wait for all outstanding cmds
  * @instance:  Adapter soft state
@@ -5386,17 +5365,6 @@ static int megasas_init_fw(struct megasas_instance 
*instance)
instance->skip_heartbeat_timer_del = 1;
}
 
-   if (instance->is_ventura) {
-   atomic64_set(>bytes_wrote, 0);
-   atomic_set(>r1_write_fp_capable, 1);
-   megasas_start_timer(instance,
-   >r1_fp_hold_timer,
-   megasas_change_r1_fp_status,
-   MEGASAS_RAID1_FAST_PATH_STATUS_CHECK_INTERVAL);
-   dev_info(>pdev->dev, "starting the 
raid 1 fp timer with interval %d\n",
-   MEGASAS_RAID1_FAST_PATH_STATUS_CHECK_INTERVAL);
-   }
-
return 0;
 
 fail_get_ld_pd_list:
@@ -6187,9 +6155,6 @@ megasas_suspend(struct pci_dev *pdev, pm_message_t state)
if (instance->requestorId && !instance->skip_heartbeat_timer_del)
del_timer_sync(>sriov_heartbeat_timer);
 
-   if (instance->is_ventura)
-   del_timer_sync(>r1_fp_hold_timer);
-
megasas_flush_cache(instance);
megasas_shutdown_controller(instance,