From: Jeff Chua <jeff.chua.linux@gmail.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Stop SSD from waiting for "Spinning up disk..."
Date: Mon, 22 Jun 2015 15:25:29 +0800 (SGT) [thread overview]
Message-ID: <Pine.LNX.4.64.1506221521480.7601@boston.corp.fedex.com> (raw)
There's no need to wait for disk spin-up for USB SSD devices. This
patch allow the SSD to skip waiting disk spin-up by passing sd_mod.ssd=1
during boot-up.
If there's a better way to handle this, please share.
Thanks,
Jeff
--- linux/drivers/scsi/sd.c 2015-05-25 07:29:44.000000000 +0800
+++ linux/drivers/scsi/sd.c 2015-06-19 22:17:35.000000000 +0800
@@ -92,6 +92,9 @@
MODULE_ALIAS_SCSI_DEVICE(TYPE_MOD);
MODULE_ALIAS_SCSI_DEVICE(TYPE_RBC);
+static int ssd = 0;
+module_param(ssd, int, 0);
+
#if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT)
#define SD_MINORS 16
#else
@@ -2738,7 +2741,9 @@
goto out;
}
- sd_spinup_disk(sdkp);
+ sd_printk(KERN_NOTICE, sdkp, "ssd %s\n", ssd == 0 ? "off" : "on");
+ if(!ssd)
+ sd_spinup_disk(sdkp);
/*
* Without media there is no reason to ask; moreover, some devices
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2015-06-22 7:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 7:25 Jeff Chua [this message]
2015-06-22 15:36 ` Greg Kroah-Hartman
2015-06-23 15:02 ` Jeff Chua
2015-06-23 18:27 ` Frans Klaver
2015-06-23 18:51 ` Marc Burkhardt
2015-06-25 16:21 ` Henrique de Moraes Holschuh
2015-06-25 16:47 ` Joe Perches
2015-06-23 18:26 Andreas Mohr
2015-06-23 18:55 ` Martin Steigerwald
2015-06-24 16:22 ` Jeff Chua
2015-06-24 16:28 ` Greg Kroah-Hartman
2015-06-24 23:55 ` Jeff Chua
2015-06-25 1:41 ` Greg Kroah-Hartman
2015-06-25 6:08 ` Martin Steigerwald
2015-06-25 8:52 ` Jeff Chua
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=Pine.LNX.4.64.1506221521480.7601@boston.corp.fedex.com \
--to=jeff.chua.linux@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®