From: Ming Lei <ming.lei@redhat.com>
To: Oleksandr Natalenko <oleksandr@natalenko.name>
Cc: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
linux-block@vger.kernel.org, linux-raid@vger.kernel.org,
linux-kernel@vger.kernel.org, Shaohua Li <shli@kernel.org>
Subject: Re: I/O hangs after resuming from suspend-to-ram
Date: Wed, 30 Aug 2017 13:17:31 +0800 [thread overview]
Message-ID: <20170830051725.GA5840@ming.t460p> (raw)
In-Reply-To: <20170830021537.GA4897@ming.t460p>
On Wed, Aug 30, 2017 at 10:15:37AM +0800, Ming Lei wrote:
> Hi,
>
> On Tue, Aug 29, 2017 at 05:52:42PM +0200, Oleksandr Natalenko wrote:
> > Hello.
> >
> > Re-tested with v4.13-rc7 + proposed patch and got the same result.
>
> Maybe there is another issue, I didn't use dmcrypt on raid10, will
> test in your way to see if I can reproduce it.
>
> BTW, could you share us which blk-mq scheduler you are using on sata?
> The patch I posted should address one issue on none scheduler.
Can't reproduce even with putting dmcypt on raid10 after applying
my patch.
Could you apply the following debug patch and provide the dmesg log
after running the commands below?
# echo 9 > /proc/sys/kernel/printk
# echo devices > /sys/power/pm_test
# echo mem > /sys/power/state
BTW, it is better to provide the two sata disk(behind raid10) name.
diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c
index b44c1bb687a2..75b13248ea1c 100644
--- a/drivers/scsi/scsi_pm.c
+++ b/drivers/scsi/scsi_pm.c
@@ -53,17 +53,22 @@ static int scsi_dev_type_suspend(struct device *dev,
{
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
int err;
+ struct scsi_device *sdev = to_scsi_device(dev);
/* flush pending in-flight resume operations, suspend is synchronous */
async_synchronize_full_domain(&scsi_sd_pm_domain);
- err = scsi_device_quiesce(to_scsi_device(dev));
+ sdev_printk(KERN_WARNING, sdev, "%s: enter\n", __func__);
+ err = scsi_device_quiesce(sdev);
if (err == 0) {
+ sdev_printk(KERN_WARNING, sdev, "%s: before suspend\n", __func__);
err = cb(dev, pm);
+ sdev_printk(KERN_WARNING, sdev, "%s: after suspend\n", __func__);
if (err)
- scsi_device_resume(to_scsi_device(dev));
+ scsi_device_resume(sdev);
}
dev_dbg(dev, "scsi suspend: %d\n", err);
+ sdev_printk(KERN_WARNING, sdev, "%s: exit\n", __func__);
return err;
}
@@ -72,9 +77,13 @@ static int scsi_dev_type_resume(struct device *dev,
{
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
int err = 0;
+ struct scsi_device *sdev = to_scsi_device(dev);
+ sdev_printk(KERN_WARNING, sdev, "%s: enter\n", __func__);
+ sdev_printk(KERN_WARNING, sdev, "%s: before resume\n", __func__);
err = cb(dev, pm);
- scsi_device_resume(to_scsi_device(dev));
+ sdev_printk(KERN_WARNING, sdev, "%s: after resume\n", __func__);
+ scsi_device_resume(sdev);
dev_dbg(dev, "scsi resume: %d\n", err);
if (err == 0) {
@@ -83,6 +92,7 @@ static int scsi_dev_type_resume(struct device *dev,
pm_runtime_enable(dev);
}
+ sdev_printk(KERN_WARNING, sdev, "%s: exit\n", __func__);
return err;
}
--
Ming
next prev parent reply other threads:[~2017-08-30 5:17 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 11:45 I/O hangs after resuming from suspend-to-ram Oleksandr Natalenko
2017-08-26 10:37 ` Oleksandr Natalenko
2017-08-26 10:48 ` Oleksandr Natalenko
2017-08-26 11:19 ` Martin Steigerwald
2017-08-26 17:17 ` Wols Lists
2017-08-26 19:33 ` Martin Steigerwald
2017-08-26 13:32 ` Oleksandr Natalenko
2017-08-27 6:02 ` Ming Lei
2017-08-27 7:43 ` Oleksandr Natalenko
2017-08-28 12:58 ` Ming Lei
2017-08-28 13:10 ` Martin Steigerwald
2017-08-28 13:32 ` Ming Lei
2017-09-20 17:25 ` Martin Steigerwald
2017-09-20 22:17 ` Ming Lei
2017-09-24 17:33 ` Martin Steigerwald
2017-09-25 2:59 ` Ming Lei
2017-09-25 14:13 ` Martin Steigerwald
2017-09-20 22:20 ` Ming Lei
2017-09-21 7:30 ` Martin Steigerwald
2017-09-21 7:33 ` Martin Steigerwald
2017-08-28 18:22 ` Oleksandr Natalenko
2017-08-29 0:24 ` Ming Lei
2017-08-29 15:52 ` Oleksandr Natalenko
2017-08-30 2:15 ` Ming Lei
2017-08-30 5:17 ` Ming Lei [this message]
2017-08-30 6:15 ` oleksandr
2017-08-30 8:06 ` Ming Lei
2017-08-30 10:58 ` oleksandr
2017-08-30 14:37 ` Ming Lei
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=20170830051725.GA5840@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=oleksandr@natalenko.name \
--cc=shli@kernel.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 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).