From: Greg KH <greg@kroah.com>
To: Joe Perches <joe@perches.com>
Cc: devel@driverdev.osuosl.org, haiyangz@microsoft.com,
gregkh@suse.de, Hank Janssen <hjanssen@sailtheuniverse.com>,
linux-kernel@vger.kernel.org, virtualization@lists.osdl.org
Subject: Re: [PATCH 5/5] staging: hv: Gracefully handle SCSI resets - RESEND
Date: Thu, 2 Sep 2010 13:08:39 -0700 [thread overview]
Message-ID: <20100902200839.GD16897@kroah.com> (raw)
In-Reply-To: <1283358535.1797.174.camel@Joe-Laptop>
On Wed, Sep 01, 2010 at 09:28:53AM -0700, Joe Perches wrote:
> On Tue, 2010-08-31 at 11:22 -0700, Hank Janssen wrote:
> > If we get a SCSI host bus reset we now gracefully handle it, and we
> > take the device offline. This before sometimes caused hangs.
> > ---
> > drivers/staging/hv/storvsc.c | 36 +++++++++++++++++++++++++++++++++++-
> []
> > + /*
> > + * Wait for traffic in transit to complete
> > + */
> > + while (atomic_read(&storDevice->NumOutstandingRequests))
> > + udelay(1000);
> > +
>
> Is it useful to have a maximum check or timeout?
> Maybe use usleep_range?
Yeah, that's not good, you need to have some way to get out of here in
case something bad happens and that number never goes down.
Why not just use a completion function instead of a busy loop?
thanks,
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <greg@kroah.com>
To: Joe Perches <joe@perches.com>
Cc: Hank Janssen <hjanssen@sailtheuniverse.com>,
devel@driverdev.osuosl.org, virtualization@lists.osdl.org,
haiyangz@microsoft.com, gregkh@suse.de,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] staging: hv: Gracefully handle SCSI resets - RESEND
Date: Thu, 2 Sep 2010 13:08:39 -0700 [thread overview]
Message-ID: <20100902200839.GD16897@kroah.com> (raw)
In-Reply-To: <1283358535.1797.174.camel@Joe-Laptop>
On Wed, Sep 01, 2010 at 09:28:53AM -0700, Joe Perches wrote:
> On Tue, 2010-08-31 at 11:22 -0700, Hank Janssen wrote:
> > If we get a SCSI host bus reset we now gracefully handle it, and we
> > take the device offline. This before sometimes caused hangs.
> > ---
> > drivers/staging/hv/storvsc.c | 36 +++++++++++++++++++++++++++++++++++-
> []
> > + /*
> > + * Wait for traffic in transit to complete
> > + */
> > + while (atomic_read(&storDevice->NumOutstandingRequests))
> > + udelay(1000);
> > +
>
> Is it useful to have a maximum check or timeout?
> Maybe use usleep_range?
Yeah, that's not good, you need to have some way to get out of here in
case something bad happens and that number never goes down.
Why not just use a completion function instead of a busy loop?
thanks,
greg k-h
next prev parent reply other threads:[~2010-09-02 20:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-31 18:22 [PATCH 5/5] staging: hv: Gracefully handle SCSI resets - RESEND Hank Janssen
2010-09-01 16:28 ` Joe Perches
2010-09-02 20:08 ` Greg KH [this message]
2010-09-02 20:08 ` Greg KH
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=20100902200839.GD16897@kroah.com \
--to=greg@kroah.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=haiyangz@microsoft.com \
--cc=hjanssen@sailtheuniverse.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.osdl.org \
/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 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.