* AHCI link power management and surprise hotplug
@ 2009-03-19 11:03 Tim Small
2009-03-19 18:06 ` Jeff Garzik
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tim Small @ 2009-03-19 11:03 UTC (permalink / raw)
To: linux-ide; +Cc: kristen.c.accardi
Hello,
I've been configuring SATA link power management
(Documentation/scsi/link_power_management_policy.txt) on servers which
use software RAID for a while, but I happened to come across this in the
ICH9 datasheet:
"
For reliable device removal notification while in AHCI operation without
the use of interlock switches (surprise removal), interface power
management should be disabled for the associated port. See Section 7.3.1
of the AHCI Specification for more information.
"
Is this actually an issue from a libata point of view? Do I need to
ensure that link power management is disabled prior to hot-removal, and
if so, I suppose link_power_management_policy.txt should be updated to
reflect this...
On a related topic, is there any way to do anything other than
"surprise" removal with libata? It'd be nice to put a drive to sleep
(e.g. with "hdparm -Y"), and ensure that nothing comes along and causes
the drive to be reset and spin the drive attached to that SATA port back
up prior to a removal and reinsertion.
I'm assuming that physically unplugging a non-spinning drive is
preferable to unplugging a spinning one from a drive longevity point of
view (I use SATA drives as removable backup medium in some cases).
Cheers,
Tim.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: AHCI link power management and surprise hotplug
2009-03-19 11:03 AHCI link power management and surprise hotplug Tim Small
@ 2009-03-19 18:06 ` Jeff Garzik
2009-03-20 1:56 ` Tejun Heo
2009-03-20 17:42 ` Kristen Carlson Accardi
2 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2009-03-19 18:06 UTC (permalink / raw)
To: Tim Small; +Cc: linux-ide, kristen.c.accardi
Tim Small wrote:
> On a related topic, is there any way to do anything other than
> "surprise" removal with libata? It'd be nice to put a drive to sleep
> (e.g. with "hdparm -Y"), and ensure that nothing comes along and causes
> the drive to be reset and spin the drive attached to that SATA port back
> up prior to a removal and reinsertion.
>
> I'm assuming that physically unplugging a non-spinning drive is
> preferable to unplugging a spinning one from a drive longevity point of
> view (I use SATA drives as removable backup medium in some cases).
Unplugging the SATA cable is fine. I wouldn't yank power while it's
actively storing data, though.
Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: AHCI link power management and surprise hotplug
2009-03-19 11:03 AHCI link power management and surprise hotplug Tim Small
2009-03-19 18:06 ` Jeff Garzik
@ 2009-03-20 1:56 ` Tejun Heo
2009-03-20 17:42 ` Kristen Carlson Accardi
2 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2009-03-20 1:56 UTC (permalink / raw)
To: Tim Small; +Cc: linux-ide, kristen.c.accardi
Hello,
Tim Small wrote:
> "
> For reliable device removal notification while in AHCI operation without
> the use of interlock switches (surprise removal), interface power
> management should be disabled for the associated port. See Section 7.3.1
> of the AHCI Specification for more information.
> "
>
> Is this actually an issue from a libata point of view? Do I need to
> ensure that link power management is disabled prior to hot-removal, and
> if so, I suppose link_power_management_policy.txt should be updated to
> reflect this...
Yeap, libata wouldn't know the device is yanked out. It will find out
later when it tries to issue a command later tho. It could be a
problem if you hot-swap the drive. libata wouldn't know that devices
have been exchanged.
> On a related topic, is there any way to do anything other than
> "surprise" removal with libata? It'd be nice to put a drive to sleep
> (e.g. with "hdparm -Y"), and ensure that nothing comes along and causes
> the drive to be reset and spin the drive attached to that SATA port back
> up prior to a removal and reinsertion.
echo 1 > /sys/block/sdX/device/delete
> I'm assuming that physically unplugging a non-spinning drive is
> preferable to unplugging a spinning one from a drive longevity point of
> view (I use SATA drives as removable backup medium in some cases).
Yeah, you'll induce an emergency unload if you remove power while the
drive is spinning, but drives are designed to deal with certain number
of those events and if it doesn't happen regularly, you don't need to
worry about it.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: AHCI link power management and surprise hotplug
2009-03-19 11:03 AHCI link power management and surprise hotplug Tim Small
2009-03-19 18:06 ` Jeff Garzik
2009-03-20 1:56 ` Tejun Heo
@ 2009-03-20 17:42 ` Kristen Carlson Accardi
2 siblings, 0 replies; 4+ messages in thread
From: Kristen Carlson Accardi @ 2009-03-20 17:42 UTC (permalink / raw)
To: Tim Small; +Cc: linux-ide@vger.kernel.org
On Thu, 19 Mar 2009 04:03:37 -0700
Tim Small <tim@buttersideup.com> wrote:
> Hello,
>
> I've been configuring SATA link power management
> (Documentation/scsi/link_power_management_policy.txt) on servers which
> use software RAID for a while, but I happened to come across this in the
> ICH9 datasheet:
>
> "
> For reliable device removal notification while in AHCI operation without
> the use of interlock switches (surprise removal), interface power
> management should be disabled for the associated port. See Section 7.3.1
> of the AHCI Specification for more information.
> "
>
>
> Is this actually an issue from a libata point of view? Do I need to
> ensure that link power management is disabled prior to hot-removal, and
> if so, I suppose link_power_management_policy.txt should be updated to
> reflect this...
Hi,
Yes - this is an issue. Right now we disable hotplug when link power
management is enabled because when your link is in a lower power state
it cannot detect the phy state changes. Most platforms I've seen do
not support the interlock switches - so ATM link pwr management and
hotplug are mutually excludive. I agree that the documentation
should reflect this - would you like to submit a patch to the
link_power_management_policy.txt file?
Thanks!
Kristen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-20 17:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-19 11:03 AHCI link power management and surprise hotplug Tim Small
2009-03-19 18:06 ` Jeff Garzik
2009-03-20 1:56 ` Tejun Heo
2009-03-20 17:42 ` Kristen Carlson Accardi
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).