* ahci: CAP_SSS and parallel scan
@ 2010-05-06 8:22 Tejun Heo
2010-05-06 9:30 ` Arjan van de Ven
0 siblings, 1 reply; 10+ messages in thread
From: Tejun Heo @ 2010-05-06 8:22 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: Jeff Garzik, t.artem, linux-ide@vger.kernel.org
Hello,
Artem reported on bko#15918 that on his machine ahci probing takes too
long (well, if you ask me, that's not too long but anyways). This is
caused by CAP_SSS disabling parallel scan. The code was added by
Arjan in commit 886ad09fc83342aa1c5a02a0b6d3298b78a8067f. There is a
module parameter to skip this but I'm curious whether the change was
based on an actual problem as on most PC hardware by the time ahci
driver kick in, the BIOS has spun up everything already.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ahci: CAP_SSS and parallel scan
2010-05-06 8:22 ahci: CAP_SSS and parallel scan Tejun Heo
@ 2010-05-06 9:30 ` Arjan van de Ven
2010-05-06 14:44 ` Tejun Heo
0 siblings, 1 reply; 10+ messages in thread
From: Arjan van de Ven @ 2010-05-06 9:30 UTC (permalink / raw)
To: Tejun Heo; +Cc: Jeff Garzik, t.artem, linux-ide@vger.kernel.org
On 5/6/2010 1:22, Tejun Heo wrote:
> Hello,
>
> Artem reported on bko#15918 that on his machine ahci probing takes too
> long (well, if you ask me, that's not too long but anyways). This is
> caused by CAP_SSS disabling parallel scan. The code was added by
> Arjan in commit 886ad09fc83342aa1c5a02a0b6d3298b78a8067f. There is a
> module parameter to skip this but I'm curious whether the change was
> based on an actual problem as on most PC hardware by the time ahci
> driver kick in, the BIOS has spun up everything already.
This was based on Jeff's review comments on an earlier patch that did not use SSS.
The thing is, SSS means the system requests (well, demands) that we don't spin up the disks
up in parallel.... which we really really ought to honor... Jeff had a very valid point.
While today some bioses may spin everything up, that's not going to be the case going forward...
the industry as a whole is moving away from that (slowly but steadily).
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ahci: CAP_SSS and parallel scan
2010-05-06 9:30 ` Arjan van de Ven
@ 2010-05-06 14:44 ` Tejun Heo
2010-05-06 19:49 ` Jeff Garzik
2010-05-06 20:19 ` Mark Lord
0 siblings, 2 replies; 10+ messages in thread
From: Tejun Heo @ 2010-05-06 14:44 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: Jeff Garzik, t.artem, linux-ide@vger.kernel.org
Hello,
On 05/06/2010 11:30 AM, Arjan van de Ven wrote:
> The thing is, SSS means the system requests (well, demands) that we
> don't spin up the disks up in parallel.... which we really really
> ought to honor... Jeff had a very valid point.
Hmmm... yeah but SSS doesn't really demand it. It just says "I can do
staggered spin up". I wish this thing had been implemented in the
form of "stay spin down till necessary (ie. start in standby mode)".
Currently, there's no way to tell whether staggered spin up is needed
or drives are already spun up.
> While today some bioses may spin everything up, that's not going to
> be the case going forward... the industry as a whole is moving away
> from that (slowly but steadily).
Yeah, sure, in the long run maybe but I'm skeptical how useful this is
at this point. Going forward, the right thing to do would be
implementing some sort of token infrastructure so that drivers can
request and hold the token while spinning up a drive so that the
concurrency of spin ups can be controlled.
Jeff, what do you think about lifting the check for now unless there
are known cases where this can cause problems?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ahci: CAP_SSS and parallel scan
2010-05-06 14:44 ` Tejun Heo
@ 2010-05-06 19:49 ` Jeff Garzik
2010-05-07 5:14 ` Tejun Heo
2010-05-06 20:19 ` Mark Lord
1 sibling, 1 reply; 10+ messages in thread
From: Jeff Garzik @ 2010-05-06 19:49 UTC (permalink / raw)
To: Tejun Heo; +Cc: Arjan van de Ven, t.artem, linux-ide@vger.kernel.org
On 05/06/2010 10:44 AM, Tejun Heo wrote:
> Hello,
>
> On 05/06/2010 11:30 AM, Arjan van de Ven wrote:
>> The thing is, SSS means the system requests (well, demands) that we
>> don't spin up the disks up in parallel.... which we really really
>> ought to honor... Jeff had a very valid point.
>
> Hmmm... yeah but SSS doesn't really demand it. It just says "I can do
> staggered spin up". I wish this thing had been implemented in the
> form of "stay spin down till necessary (ie. start in standby mode)".
> Currently, there's no way to tell whether staggered spin up is needed
> or drives are already spun up.
>
>> While today some bioses may spin everything up, that's not going to
>> be the case going forward... the industry as a whole is moving away
>> from that (slowly but steadily).
>
> Yeah, sure, in the long run maybe but I'm skeptical how useful this is
> at this point. Going forward, the right thing to do would be
> implementing some sort of token infrastructure so that drivers can
> request and hold the token while spinning up a drive so that the
> concurrency of spin ups can be controlled.
>
> Jeff, what do you think about lifting the check for now unless there
> are known cases where this can cause problems?
The problem being... that we are honoring SSS bit, and thus thing are
slower? :) I don't see any reason to change that, seeing as how people
may be using it to avoid power spikes.
I agree there's no way to tell whether SSS is needed, but we cannot
ignore SSS on that basis alone. We should avoid making the assumption
that BIOS w/ SSS bit has already spun up all drives regardless.
Jeff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ahci: CAP_SSS and parallel scan
2010-05-06 14:44 ` Tejun Heo
2010-05-06 19:49 ` Jeff Garzik
@ 2010-05-06 20:19 ` Mark Lord
2010-05-07 5:16 ` Tejun Heo
1 sibling, 1 reply; 10+ messages in thread
From: Mark Lord @ 2010-05-06 20:19 UTC (permalink / raw)
To: Tejun Heo
Cc: Arjan van de Ven, Jeff Garzik, t.artem, linux-ide@vger.kernel.org
On 06/05/10 03:49 PM, Jeff Garzik wrote:
>
>> Currently, there's no way to tell whether staggered spin up is needed
>> or drives are already spun up.
Perhaps by issuing a "CHECK POWER MODE" command?
For many drives, a non-spinning drive is detectable from its IDENTIFY data.
Cheers
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ahci: CAP_SSS and parallel scan
2010-05-06 19:49 ` Jeff Garzik
@ 2010-05-07 5:14 ` Tejun Heo
2010-05-07 21:33 ` Jeff Garzik
0 siblings, 1 reply; 10+ messages in thread
From: Tejun Heo @ 2010-05-07 5:14 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Arjan van de Ven, t.artem, linux-ide@vger.kernel.org
Hello,
On 05/06/2010 09:49 PM, Jeff Garzik wrote:
> The problem being... that we are honoring SSS bit, and thus thing are
> slower? :) I don't see any reason to change that, seeing as how people
> may be using it to avoid power spikes.
>
> I agree there's no way to tell whether SSS is needed, but we cannot
> ignore SSS on that basis alone. We should avoid making the assumption
> that BIOS w/ SSS bit has already spun up all drives regardless.
It's just that the usefulness seems very limited at this point so it
might be better idea to flip the default behavior and let people opt
in for SSS. The problem is compounded by the complete serial behavior
we end up with and on some machines large number of ahci ports. I
don't care much about boot time all that much but as that seems to be
a hot issue on desktops too these days.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ahci: CAP_SSS and parallel scan
2010-05-06 20:19 ` Mark Lord
@ 2010-05-07 5:16 ` Tejun Heo
0 siblings, 0 replies; 10+ messages in thread
From: Tejun Heo @ 2010-05-07 5:16 UTC (permalink / raw)
To: Mark Lord
Cc: Arjan van de Ven, Jeff Garzik, t.artem, linux-ide@vger.kernel.org
On 05/06/2010 10:19 PM, Mark Lord wrote:
> On 06/05/10 03:49 PM, Jeff Garzik wrote:
>>
>>> Currently, there's no way to tell whether staggered spin up is needed
>>> or drives are already spun up.
>
> Perhaps by issuing a "CHECK POWER MODE" command?
> For many drives, a non-spinning drive is detectable from its IDENTIFY data.
Heh, yeah, I wish it were like that. IIRC, there are two different
staggered spin up scheme. The one implemented by CAP_SSS uses link
init sequence as signal to spin up which means you don't even know
whether there's a device attached before committing to spinning it up.
Gotta love ATA. :-)
--
tejun
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ahci: CAP_SSS and parallel scan
2010-05-07 5:14 ` Tejun Heo
@ 2010-05-07 21:33 ` Jeff Garzik
2010-05-08 8:40 ` Tejun Heo
0 siblings, 1 reply; 10+ messages in thread
From: Jeff Garzik @ 2010-05-07 21:33 UTC (permalink / raw)
To: Tejun Heo; +Cc: Arjan van de Ven, t.artem, linux-ide@vger.kernel.org
On 05/07/2010 01:14 AM, Tejun Heo wrote:
> Hello,
>
> On 05/06/2010 09:49 PM, Jeff Garzik wrote:
>> The problem being... that we are honoring SSS bit, and thus thing are
>> slower? :) I don't see any reason to change that, seeing as how people
>> may be using it to avoid power spikes.
>>
>> I agree there's no way to tell whether SSS is needed, but we cannot
>> ignore SSS on that basis alone. We should avoid making the assumption
>> that BIOS w/ SSS bit has already spun up all drives regardless.
>
> It's just that the usefulness seems very limited at this point so it
> might be better idea to flip the default behavior and let people opt
> in for SSS. The problem is compounded by the complete serial behavior
> we end up with and on some machines large number of ahci ports. I
> don't care much about boot time all that much but as that seems to be
> a hot issue on desktops too these days.
I'm not sure the usefulness is limited, as it definitely avoids power
spikes on server BIOSen that care.
Also, it seems unwise for the Linux SATA driver to do the exact
-opposite- of what the SSS bit intends, by default.
The existing ignore_sss option should be sufficient for people who wish
to entertain non-standard behavior...
Jeff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ahci: CAP_SSS and parallel scan
2010-05-07 21:33 ` Jeff Garzik
@ 2010-05-08 8:40 ` Tejun Heo
2010-05-08 21:53 ` Jeff Garzik
0 siblings, 1 reply; 10+ messages in thread
From: Tejun Heo @ 2010-05-08 8:40 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Arjan van de Ven, t.artem, linux-ide@vger.kernel.org
On 05/07/2010 11:33 PM, Jeff Garzik wrote:
> I'm not sure the usefulness is limited, as it definitely avoids power
> spikes on server BIOSen that care.
So, are there actually machines which get affected by this? In that
case, sure, the current behavior is the right one.
> Also, it seems unwise for the Linux SATA driver to do the exact
> -opposite- of what the SSS bit intends, by default.
Yeah, well, the thing is that SSS in itself doesn't really indicate
need for staggered spin up. It just says it knows how to.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ahci: CAP_SSS and parallel scan
2010-05-08 8:40 ` Tejun Heo
@ 2010-05-08 21:53 ` Jeff Garzik
0 siblings, 0 replies; 10+ messages in thread
From: Jeff Garzik @ 2010-05-08 21:53 UTC (permalink / raw)
To: Tejun Heo; +Cc: Arjan van de Ven, t.artem, linux-ide@vger.kernel.org
On 05/08/2010 04:40 AM, Tejun Heo wrote:
> On 05/07/2010 11:33 PM, Jeff Garzik wrote:
>> I'm not sure the usefulness is limited, as it definitely avoids power
>> spikes on server BIOSen that care.
>
> So, are there actually machines which get affected by this? In that
> case, sure, the current behavior is the right one.
The current behavior is the safe, conservative interpretation. The
alternative is risking unwanted power spikes for the sake of boot speed.
I would set a high barrier for taking that risk: polling multiple
hardware vendors about in-the-field SSS usage.
>> Also, it seems unwise for the Linux SATA driver to do the exact
>> -opposite- of what the SSS bit intends, by default.
>
> Yeah, well, the thing is that SSS in itself doesn't really indicate
> need for staggered spin up. It just says it knows how to.
A valid point, I agree. But absent any other method of communicating
that SSS behavior is desired, activating staggered spin-up based on SSS
is the only logical interpretation, AFAICS. SSS bit set implies SSS
-might- be needed. If SSS might be needed, then one must stagger
spin-up or risk failing to meet the requirement. !SSS is the only case
where you are -guaranteed- not to need staggered spin-up.
Jeff
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-05-08 21:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06 8:22 ahci: CAP_SSS and parallel scan Tejun Heo
2010-05-06 9:30 ` Arjan van de Ven
2010-05-06 14:44 ` Tejun Heo
2010-05-06 19:49 ` Jeff Garzik
2010-05-07 5:14 ` Tejun Heo
2010-05-07 21:33 ` Jeff Garzik
2010-05-08 8:40 ` Tejun Heo
2010-05-08 21:53 ` Jeff Garzik
2010-05-06 20:19 ` Mark Lord
2010-05-07 5:16 ` Tejun Heo
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).