linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Wilck <mwilck@suse.de>
To: Quinn Tran <qutran@marvell.com>,
	Himanshu Madhani <hmadhani@marvell.com>,
	"James.Bottomley@HansenPartnership.com" 
	<James.Bottomley@HansenPartnership.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [EXT] Re: [PATCH v2 04/14] qla2xxx: Optimize NPIV tear down process
Date: Fri, 27 Sep 2019 08:33:16 +0200	[thread overview]
Message-ID: <08eb80bb23d057f6ba1cf44cf8d4e2d3e597a25e.camel@suse.de> (raw)
In-Reply-To: <CFC8098F-46C2-49E6-9BC3-7E220F6F2535@marvell.com>

On Thu, 2019-09-26 at 16:56 +0000, Quinn Tran wrote:
>     
>     Are you missing a negation in this last line?
>     Also, what's the point of adding this loop? 
> 
> QT:  good catch.  The idea is to not sleep the full 10Hz, if the
> vref_count already reaches zero or reaches zero under
> 10Hz.  Otherwise, loop/wait for 10Hz.   We're trying to get NPIV tear
> down to go faster.

AFAIU, wait_event_timeout() returns before the timeout has elapsed, if
the tested condition becomes true _and_ the wait queue is woken up. 
Thus the loop shouldn't be necessary. Are you missing a wake_up() call
to vref_waitq somewhere? 

Perhaps you should replace all calls to 

        atomic_dec(&X->vref_count);

with something like

        if (atomic_dec_and_test(&X->vref_count))
                wake_up(&X->vref_waitq);

??

Martin



  reply	other threads:[~2019-09-27  6:33 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12 18:09 [PATCH v2 00/14] qla2xxx: Bug fixes for the driver Himanshu Madhani
2019-09-12 18:09 ` [PATCH v2 01/14] qla2xxx: Silence fwdump template message Himanshu Madhani
2019-09-12 18:09 ` [PATCH v2 02/14] qla2xxx: Fix unbound sleep in fcport delete path Himanshu Madhani
2019-09-30 15:54   ` Bart Van Assche
2019-09-12 18:09 ` [PATCH v2 03/14] qla2xxx: Fix stale mem access on driver unload Himanshu Madhani
2019-09-12 18:09 ` [PATCH v2 04/14] qla2xxx: Optimize NPIV tear down process Himanshu Madhani
2019-09-26 10:52   ` Martin Wilck
2019-09-26 16:56     ` [EXT] " Quinn Tran
2019-09-27  6:33       ` Martin Wilck [this message]
2019-09-12 18:09 ` [PATCH v2 05/14] qla2xxx: Fix N2N link reset Himanshu Madhani
2019-09-12 18:09 ` [PATCH v2 06/14] qla2xxx: Fix N2N link up fail Himanshu Madhani
2019-09-12 18:09 ` [PATCH v2 07/14] qla2xxx: Fix Nport ID display value Himanshu Madhani
2019-09-13 22:32   ` Roman Bolshakov
2019-09-12 18:09 ` [PATCH v2 08/14] qla2xxx: Dual FCP-NVMe target port support Himanshu Madhani
2019-10-10  2:27   ` Martin K. Petersen
2019-09-12 18:09 ` [PATCH v2 09/14] qla2xxx: Add error handling for PLOGI ELS passthrough Himanshu Madhani
2019-09-12 18:09 ` [PATCH v2 10/14] qla2xxx: Set remove flag for all VP Himanshu Madhani
2019-09-12 18:09 ` [PATCH v2 11/14] qla2xxx: Check for MB timeout while capturing ISP27/28xx FW dump Himanshu Madhani
2019-09-12 20:22   ` Laurence Oberman
2019-09-12 18:09 ` [PATCH v2 12/14] qla2xxx: Capture FW dump on MPI heartbeat stop event Himanshu Madhani
2019-09-12 20:22   ` Laurence Oberman
2019-09-12 18:09 ` [PATCH v2 13/14] qla2xxx: Improve logging for scan thread Himanshu Madhani
2019-09-12 18:09 ` [PATCH v2 14/14] qla2xxx: Update driver version to 10.01.00.20-k Himanshu Madhani
2019-09-24  3:13 ` [PATCH v2 00/14] qla2xxx: Bug fixes for the driver 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=08eb80bb23d057f6ba1cf44cf8d4e2d3e597a25e.camel@suse.de \
    --to=mwilck@suse.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=hmadhani@marvell.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=qutran@marvell.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;
as well as URLs for NNTP newsgroup(s).