linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* hdparm -Y hangup
@ 2002-09-20 14:24 Padraig Brady
  2002-09-21 18:13 ` jbradford
  0 siblings, 1 reply; 10+ messages in thread
From: Padraig Brady @ 2002-09-20 14:24 UTC (permalink / raw)
  To: linux-kernel

This seems like a bug in the ide driver not issuing a reset?

On RH7.3 (2.4.18-3) if I do:
$ hdparm -Y /dev/hda
$ do stuff and disk spins up
$ hdparm -Y /dev/hda
$ everything hangs waiting for disk

cheers,
Pádraig.

Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller on PCI bus 00 dev f9
PIIX4: chipset revision 2
PIIX4: not 100% native mode: will probe irqs later
     ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:pio
     ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio
hda: Maxtor 4D040H2, ATA DISK drive
hdc: SAMSUNG CD-ROM SC-148C, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
blk: queue c035e6a4, I/O limit 4095Mb (mask 0xffffffff)
hda: 78125000 sectors (40000 MB) w/2048KiB Cache, CHS=4863/255/63, UDMA(66)
ide-floppy driver 0.99.newide
Partition check:
  hda: hda1 hda2 hda3 hda4 < hda5 hda6 >


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hdparm -Y hangup
  2002-09-20 14:24 hdparm -Y hangup Padraig Brady
@ 2002-09-21 18:13 ` jbradford
  2002-09-23  8:32   ` Padraig Brady
  0 siblings, 1 reply; 10+ messages in thread
From: jbradford @ 2002-09-21 18:13 UTC (permalink / raw)
  To: Padraig Brady; +Cc: linux-kernel

> This seems like a bug in the ide driver not issuing a reset?
> 
> On RH7.3 (2.4.18-3) if I do:
> $ hdparm -Y /dev/hda
> $ do stuff and disk spins up
> $ hdparm -Y /dev/hda
> $ everything hangs waiting for disk

It *IS* a bug, but only Mark Lord, (the hdparm maintainer), and I seem to care about it - everybody else says, "just do hdparm -y instead", which is missing the point.

Incidently, I think you mean:

On RH7.3 (2.4.18-3) if I do:
$ hdparm -y /dev/hda
$ do stuff and disk spins up
$ hdparm -Y /dev/hda
$ everything hangs waiting for disk

with a lower case y for the first example.

So, unless you, I, or Mark Lord fixes it, it stays broken :-).

John.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hdparm -Y hangup
  2002-09-21 18:13 ` jbradford
@ 2002-09-23  8:32   ` Padraig Brady
  2002-09-23  9:44     ` jbradford
  0 siblings, 1 reply; 10+ messages in thread
From: Padraig Brady @ 2002-09-23  8:32 UTC (permalink / raw)
  To: jbradford; +Cc: linux-kernel

jbradford@dial.pipex.com wrote:
>>This seems like a bug in the ide driver not issuing a reset?
>>
>>On RH7.3 (2.4.18-3) if I do:
>>$ hdparm -Y /dev/hda
>>$ do stuff and disk spins up
>>$ hdparm -Y /dev/hda
>>$ everything hangs waiting for disk
> 
> It *IS* a bug, but only Mark Lord, (the hdparm maintainer), and I seem to care about it - everybody else says, "just do hdparm -y instead", which is missing the point.

Hrm, OK thanks for the info. Perhaps it should be removed
from hdparm or a (DANGEROUS) put beside the description
until it's fixed.

> 
> Incidently, I think you mean:
> 
> On RH7.3 (2.4.18-3) if I do:
> $ hdparm -y /dev/hda
> $ do stuff and disk spins up
> $ hdparm -Y /dev/hda
> $ everything hangs waiting for disk
> 
> with a lower case y for the first example.

No it seemed to wake up correctly the first time with -Y.
As you say -y works always.

> So, unless you, I, or Mark Lord fixes it, it stays broken :-).

cheers,
Pádraig.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hdparm -Y hangup
  2002-09-23  8:32   ` Padraig Brady
@ 2002-09-23  9:44     ` jbradford
  2002-09-24 21:06       ` Bill Davidsen
  0 siblings, 1 reply; 10+ messages in thread
From: jbradford @ 2002-09-23  9:44 UTC (permalink / raw)
  To: Padraig Brady; +Cc: linux-kernel

> Hrm, OK thanks for the info. Perhaps it should be removed
> from hdparm or a (DANGEROUS) put beside the description
> until it's fixed.

The person to contact would be Mark Lord, the hdparm maintainer, (see the hdparm manual page for his E-Mail address).

> > Incidently, I think you mean:
> > 
> > On RH7.3 (2.4.18-3) if I do:
> > $ hdparm -y /dev/hda
> > $ do stuff and disk spins up
> > $ hdparm -Y /dev/hda
> > $ everything hangs waiting for disk
> > 
> > with a lower case y for the first example.
> 
> No it seemed to wake up correctly the first time with -Y.

That *is* strange.

> As you say -y works always.

On the systems I have tried it, yes - I'm not saying it always works.

John.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hdparm -Y hangup
  2002-09-23  9:44     ` jbradford
@ 2002-09-24 21:06       ` Bill Davidsen
  2002-09-25  7:49         ` jbradford
  0 siblings, 1 reply; 10+ messages in thread
From: Bill Davidsen @ 2002-09-24 21:06 UTC (permalink / raw)
  To: jbradford; +Cc: Padraig Brady, linux-kernel

On Mon, 23 Sep 2002 jbradford@dial.pipex.com wrote:

> > Hrm, OK thanks for the info. Perhaps it should be removed
> > from hdparm or a (DANGEROUS) put beside the description
> > until it's fixed.
> 
> The person to contact would be Mark Lord, the hdparm maintainer, (see the hdparm manual page for his E-Mail address).

Rather than have Mark Lord set the option DANGEROUS (it shouldn't be)
perhaps it could be made to work more than once...  Odd problem, is
something not getting set or cleared when the drive is spun up the first
time?

-- 
bill davidsen <davidsen@tmr.com>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hdparm -Y hangup
  2002-09-24 21:06       ` Bill Davidsen
@ 2002-09-25  7:49         ` jbradford
  0 siblings, 0 replies; 10+ messages in thread
From: jbradford @ 2002-09-25  7:49 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: padraig.brady, linux-kernel

> > > Hrm, OK thanks for the info. Perhaps it should be removed
> > > from hdparm or a (DANGEROUS) put beside the description
> > > until it's fixed.
> > 
> > The person to contact would be Mark Lord, the hdparm maintainer, (see the
> > hdparm manual page for his E-Mail address).
> 
> Rather than have Mark Lord set the option DANGEROUS (it shouldn't be)
> perhaps it could be made to work more than once... Odd problem, is
> something not getting set or cleared when the drive is spun up the first
> time?

With my Maxtor disk connected to a PIIX3 IDE interface and stock kernel 2.4.19, I get this behavior:

# hdparm -Y /dev/hda

Disk sleeps

# find

No disk activity - it doesn't wake up.  It doesn't work once for me, it always hangs on the first attempt.

So, I try dmesg on another console - no new output.

# hdparm -w /dev/hda

Performs a device reset, and the disk spins up.

# dmesg

hda: ide_set_handler: handler not null; c0181050
hda: dma_intr: status=0xd0 { Busy }
hda: DMA disabled
hda: ide_set_handler: handler not null; old=c0181050, new=c017b160
bug: kernel timer added twice at c017afe1.
hda: ide_set_handler: handler not null; old=c017b160, new=c017b160
ide0: reset: success

Obviously, if you're going to try to repeat this, sync the disk beforehand, because I assume that a device reset will loose data in the disk's write cache.

John.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hdparm -Y hangup
  2002-09-25 15:06   ` Padraig Brady
@ 2002-09-25 16:11     ` jbradford
  0 siblings, 0 replies; 10+ messages in thread
From: jbradford @ 2002-09-25 16:11 UTC (permalink / raw)
  To: Padraig Brady; +Cc: cogwepeter, linux-kernel, mlord

> >> Clarification: is it the case that hdparm -Y (sleep) will cool the 
> >> drive off better than hdparm -y (suspend)?
> > 
> > 
> > In theory, -Y is capable of greater power (heat) savings than -y,
> > but in practice this will be model-specific and probably
> > will pale in comparism to the huge savings from -y alone.

Agreed.  It may well be less than one watt of power saving.

> True. Is there any chance you could mark -Y (DANGEROUS).
> Even if it is dangerous currently because of an IDE bug
> it still is dangerous.

I strongly disagree - we don't know that it fails on more than a few configurations at the moment.  If you mark everything as (DANGEROUS), then you might as well not mark any of it (DANGEROUS), and delete the whole package.

We need to establish what causes the -Y problem, and then ask Mark to put a note saying something like, 'Do not use on kernels < 2.4.X'

When I said the person to ask would be Mark, I *didn't* mean that I thought it *should* be marked (DANGEROUS), only that we should be investigating it!!!

> >> I read somewhere that -Y only works on unmounted drives. This appears 
> >> to be false. Comments?
> > 
> > It should work on the raw drive regardless.

There is no reason why it should fail on a mounted drive.

John.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hdparm -Y hangup
  2002-09-25 14:58 ` Mark Lord
@ 2002-09-25 15:06   ` Padraig Brady
  2002-09-25 16:11     ` jbradford
  0 siblings, 1 reply; 10+ messages in thread
From: Padraig Brady @ 2002-09-25 15:06 UTC (permalink / raw)
  To: Mark Lord; +Cc: Peter, linux-kernel

Mark Lord wrote:
> Peter wrote:
> 
>>
>> Clarification: is it the case that hdparm -Y (sleep) will cool the 
>> drive off better than hdparm -y (suspend)?
> 
> 
> In theory, -Y is capable of greater power (heat) savings than -y,
> but in practice this will be model-specific and probably
> will pale in comparism to the huge savings from -y alone.

True. Is there any chance you could mark -Y (DANGEROUS).
Even if it is dangerous currently because of an IDE bug
it still is dangerous.

>> I read somewhere that -Y only works on unmounted drives. This appears 
>> to be false. Comments?
> 
> It should work on the raw drive regardless.

thanks,
Pádraig.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hdparm -Y hangup
  2002-09-23 23:08 Peter
@ 2002-09-25 14:58 ` Mark Lord
  2002-09-25 15:06   ` Padraig Brady
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Lord @ 2002-09-25 14:58 UTC (permalink / raw)
  To: Peter; +Cc: linux-kernel

Peter wrote:
> 
> Clarification: is it the case that hdparm -Y (sleep) will cool the drive 
> off better than hdparm -y (suspend)?

In theory, -Y is capable of greater power (heat) savings than -y,
but in practice this will be model-specific and probably
will pale in comparism to the huge savings from -y alone.

> 
> I read somewhere that -Y only works on unmounted drives. This appears to 
> be false. Comments?

It should work on the raw drive regardless.

Cheers
-- 
Mark Lord
Real-Time Remedies Inc.
mlord@pobox.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: hdparm -Y hangup
@ 2002-09-23 23:08 Peter
  2002-09-25 14:58 ` Mark Lord
  0 siblings, 1 reply; 10+ messages in thread
From: Peter @ 2002-09-23 23:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mark Lord


Not so -- we do so care! I get the same behavior on 2.4.19-ac4. 

I ran hdparm -Y /dev/hdd on an IBM 120GB DeskStar. The specs sheet 
recommends no more than 8 hours of power-on a day, so I use it as a backup 
drive. The machine it's on is never turned off.

Clarification: is it the case that hdparm -Y (sleep) will cool the drive 
off better than hdparm -y (suspend)?

I read somewhere that -Y only works on unmounted drives. This appears to 
be false. Comments?

Cheers,
Peter

jbradford@dial.pipex.com wrote,

>> On RH7.3 (2.4.18-3) if I do:
>> $ hdparm -Y /dev/hda
>> $ do stuff and disk spins up
>> $ hdparm -Y /dev/hda
>> $ everything hangs waiting for disk
>                   
>It *IS* a bug, but only Mark Lord, (the hdparm maintainer), and I seem to 
>care about it - everybody else says, "just do hdparm -y instead", which 
>is missing the point.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-09-25 15:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-20 14:24 hdparm -Y hangup Padraig Brady
2002-09-21 18:13 ` jbradford
2002-09-23  8:32   ` Padraig Brady
2002-09-23  9:44     ` jbradford
2002-09-24 21:06       ` Bill Davidsen
2002-09-25  7:49         ` jbradford
2002-09-23 23:08 Peter
2002-09-25 14:58 ` Mark Lord
2002-09-25 15:06   ` Padraig Brady
2002-09-25 16:11     ` jbradford

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).