mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: Chaitra P B <chaitra.basappa@broadcom.com>
Cc: JBottomley@Parallels.com, jejb@kernel.org, hch@infradead.org,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	Sathya.Prakash@broadcom.com, kashyap.desai@broadcom.com,
	krishnaraddi.mankani@broadcom.com, linux-kernel@vger.kernel.org,
	suganath-prabu.subramani@broadcom.com,
	sreekanth.reddy@broadcom.com
Subject: Re: [PATCH v3 2/4] mpt3sas: Fix for Crusader to achieve product targets with SAS devices.
Date: Tue, 24 Jan 2017 13:02:38 +0100	[thread overview]
Message-ID: <20170124120238.GB3609@linux-x5ow.site> (raw)
In-Reply-To: <1485165370-43401-3-git-send-email-chaitra.basappa@broadcom.com>

On Mon, Jan 23, 2017 at 03:26:08PM +0530, Chaitra P B wrote:
> Small glitch/degraded performance in Crusader is improved with SAS
> drives by removing unnecessary spinlocks while clearing scsi command
> in drivers internal lookup table.
> 
> Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
> Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c  |    1 +
>  drivers/scsi/mpt3sas/mpt3sas_base.h  |    1 +
>  drivers/scsi/mpt3sas/mpt3sas_ctl.c   |    4 +++-
>  drivers/scsi/mpt3sas/mpt3sas_scsih.c |   31 ++++++++++++++++++++++++++++---
>  4 files changed, 33 insertions(+), 4 deletions(-)

[...]

> + * __scsih_scsi_lookup_get_clear - returns scmd entry without
> + *						holding any lock.
> + * @ioc: per adapter object
> + * @smid: system request message index
> + *
> + * Returns the smid stored scmd pointer.
> + * Then will dereference the stored scmd pointer.
> + */
> +static inline struct scsi_cmnd *
> +__scsih_scsi_lookup_get_clear(struct MPT3SAS_ADAPTER *ioc,
> +		u16 smid)
> +{
> +	struct scsi_cmnd *scmd = NULL;
> +
> +	swap(scmd, ioc->scsi_lookup[smid - 1].scmd);
> +
> +	return scmd;
> +}
> +
> +/**
>   * _scsih_scsi_lookup_get_clear - returns scmd entry

That's only 50% of what I've meant:

static inline struct scsi_cmnd *
_scsih_scsi_lookup_get_clear(struct MPT3SAS_ADAPTER *ioc, u16 smid)
{
	unsigned long flags;
	struct scsi_cmnd *scmnd;

	spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
-	scmd = ioc->scsi_lookup[smid - 1].scmd;
-	ioc->scsi_lookup[smid - 1].scmd = NULL;
+	scmnd = __scsih_scsi_lookup_get_clear(ioc, smid);
	spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags);

	return scmnd;
}


[...]

Byte,
	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

  reply	other threads:[~2017-01-24 12:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23  9:56 [PATCH v3 0/4] mpt3sas driver Enhancements and defect fixes: Chaitra P B
2017-01-23  9:56 ` [PATCH v3 1/4] mpt3sas: Added print to notify cable running at a degraded speed Chaitra P B
2017-01-26  8:23   ` Johannes Thumshirn
2017-01-23  9:56 ` [PATCH v3 2/4] mpt3sas: Fix for Crusader to achieve product targets with SAS devices Chaitra P B
2017-01-24 12:02   ` Johannes Thumshirn [this message]
2017-01-26  8:23   ` Johannes Thumshirn
2017-01-23  9:56 ` [PATCH v3 3/4] mpt3sas: Fix Firmware fault state 0x2100 during heavy 4K RR FIO stress test Chaitra P B
2017-01-24 12:06   ` Johannes Thumshirn
2017-01-23  9:56 ` [PATCH v3 4/4] mpt3sas: Updating driver version to v15.100.00.00 Chaitra P B
2017-02-01  3:04 ` [PATCH v3 0/4] mpt3sas driver Enhancements and defect fixes: Martin K. Petersen

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=20170124120238.GB3609@linux-x5ow.site \
    --to=jthumshirn@suse.de \
    --cc=JBottomley@Parallels.com \
    --cc=Sathya.Prakash@broadcom.com \
    --cc=chaitra.basappa@broadcom.com \
    --cc=hch@infradead.org \
    --cc=jejb@kernel.org \
    --cc=kashyap.desai@broadcom.com \
    --cc=krishnaraddi.mankani@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sreekanth.reddy@broadcom.com \
    --cc=suganath-prabu.subramani@broadcom.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®