From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "songliubraving@fb.com" <songliubraving@fb.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"hch@infradead.org" <hch@infradead.org>
Subject: Re: [RFC] scsi: reduce protection of scan_mutex in scsi_remove_device
Date: Tue, 25 Apr 2017 20:59:54 +0000 [thread overview]
Message-ID: <1493153988.2628.22.camel@sandisk.com> (raw)
In-Reply-To: <4C56F7C6-1A83-4B03-AFAD-E9C92BB2B2F6@fb.com>
On Fri, 2017-04-21 at 22:31 +0000, Song Liu wrote:
> On Apr 21, 2017, at 2:20 PM, Bart Van Assche <Bart.VanAssche@sandisk.com> wrote:
> > On Fri, 2017-04-21 at 14:13 -0700, Song Liu wrote:
> > > On the other hand, some devices do long latency IO during deletion,
> > > for example, sd_shutdown() may do sync cache and/or start_stop.
> > > It is not necessary for these commands to run in series.
> >
> > Have you noticed my patch series that makes sd_shutdown() submit the
> > SYNCHRONIZE CACHE command asynchronously? Have you tried whether that
> > patch series would be a good alternative?
>
> The asynchronous SYNCHRONIZE CACHE will not help our use case, where the
> latency comes from sd_start_stop_device(). Seems it is not easy to make
> the START STOP UNIT command async.
Hello Song,
It should be possible to make the START STOP UNIT command asynchronous too
by issuing it asynchronously from inside sd_sync_cache_done(). To avoid
dereferencing a stale struct scsi_disk pointer you will either have to hold
an additional reference as long as the SYNCHRONIZE CACHE command is in
progress or copy the data needed from struct scsi_disk into the SCSI request.
Bart.
next prev parent reply other threads:[~2017-04-25 20:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-21 21:13 [RFC] scsi: reduce protection of scan_mutex in scsi_remove_device Song Liu
2017-04-21 21:17 ` Bart Van Assche
2017-04-21 22:20 ` Song Liu
2017-04-21 21:20 ` Bart Van Assche
2017-04-21 22:31 ` Song Liu
2017-04-25 20:59 ` Bart Van Assche [this message]
2017-04-25 21:29 ` Song Liu
2017-04-24 15:28 ` Christoph Hellwig
2017-04-25 17:23 ` Bart Van Assche
2017-04-25 17:42 ` Song Liu
2017-04-25 17:52 ` Bart Van Assche
2017-04-25 21:17 ` Song Liu
2017-04-25 22:17 ` Bart Van Assche
2017-04-26 0:41 ` Song Liu
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=1493153988.2628.22.camel@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=songliubraving@fb.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 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.