All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Loud "pop" coming from hard drive on reboot
       [not found] ` <fa.8Q2FxIVtQ1sfsfDBeXACAS7rK6Y@ifi.uio.no>
@ 2007-04-18 22:57   ` Robert Hancock
  0 siblings, 0 replies; 65+ messages in thread
From: Robert Hancock @ 2007-04-18 22:57 UTC (permalink / raw)
  To: Stephen.Clark, linux-kernel; +Cc: Mark Lord

Stephen Clark wrote:
> I tried this on 2.6.20.2 it applied to libata with some fuzz and I had 
> to manually edit libata.h
> When I did a shutdown I still got the click/pop.
> 
> I also noticed the last thing displayed on the lcd before it goes blank is
> Synchronizing SCSI Disks - then the click/pop.
> 
> HTH,
> Steve

That patch on its own will not help, you also need Tejun's 
stop-on-shutdown patch, otherwise the kernel will not try to stop the 
disk before powering off.

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-21 23:20                                           ` Peter Zijlstra
@ 2007-04-23 23:27                                             ` Chuck Ebbert
  0 siblings, 0 replies; 65+ messages in thread
From: Chuck Ebbert @ 2007-04-23 23:27 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Bartlomiej Zolnierkiewicz, Mark Lord, Stephen.Clark, Tejun Heo,
	Alan Cox, 7eggert, emisca, Jan Engelhardt, linux-kernel,
	linux-ide, Adrian Bunk, Andrew Morton

Peter Zijlstra wrote:
> 
> but I have an increasing seek error rate as well. I got the ST disk
> because thinkwiki suggested it.
> 

Apparently Seagate has their own definition of seek error rate.
Large numbers are normal, or at least very common.

Now I wonder if they have their own way of doing retract count...

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 21:27                                         ` Chuck Ebbert
@ 2007-04-21 23:20                                           ` Peter Zijlstra
  2007-04-23 23:27                                             ` Chuck Ebbert
  0 siblings, 1 reply; 65+ messages in thread
From: Peter Zijlstra @ 2007-04-21 23:20 UTC (permalink / raw)
  To: Chuck Ebbert
  Cc: Bartlomiej Zolnierkiewicz, Mark Lord, Stephen.Clark, Tejun Heo,
	Alan Cox, 7eggert, emisca, Jan Engelhardt, linux-kernel,
	linux-ide, Adrian Bunk, Andrew Morton

On Wed, 2007-04-18 at 17:27 -0400, Chuck Ebbert wrote:
> Bartlomiej Zolnierkiewicz wrote:
> > On Wednesday 18 April 2007, Chuck Ebbert wrote:
> >> Mark Lord wrote:
> >>> Mark Lord wrote:
> >>>> With the patch applied, I don't see *any* new activity in those
> >>>> S.M.A.R.T.
> >>>> attributes over multiple hibernates (Linux "suspend-to-disk").
> >>> Scratch that -- operator failure.  ;)
> >>> The patch makes no difference over hibernates in the SMART logs.
> >>>
> >>> It's still logging extra Power-Off_Retract_Count pegs,
> >>> which it DID NOT USED TO DO not so long ago.
> >>>
> >> Just to add to the fun, my problems are happening with the "old"
> >> IDE drivers...
> > 
> > The issue you are experiencing results in the same problem (disk doing
> > power off retract) but it has a totally different root cause - your notebook
> > loses power on reboot.  It is actually a hardware problem and as you have
> > reported the same problem is present when using "the other" OS.
> > 
> 
> My "power off retract count" increases whether I do a halt/poweroff or
> a reboot. The only difference is the volume of the noise.
> 
> And I just noticed my "seek error rate" is increasing.
> 
> /me plans purchase of another drive, definitely not Seagate...
> 
> > I think that the issue needs to be fixed (by detecting affected notebook(s)
> > using DMI?) in Linux PM handling and not in IDE subsystem because:
> >
> > * there may be some other hardware devices affected by the power loss
> >   (== they require shutdown sequence)
> >
> > * the same problem will bite if somebody decides to use libata (FC7?)
> 
> Yeah, this needs fixing too. I've been playing with another notebook and
> the power does stay on during reboot, so I wonder how widespread the problem is?

/me too

Thinkpad T23, with a ST980815A

Ticks ever few seconds, but seems to mostly go away with 
  hdparm -B255 /dev/sda1

but I have an increasing seek error rate as well. I got the ST disk
because thinkwiki suggested it.

I suspect this problem killed the previous disk in this laptop.

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-21 14:33                                           ` Jan Engelhardt
@ 2007-04-21 15:11                                             ` Fabio Comolli
  0 siblings, 0 replies; 65+ messages in thread
From: Fabio Comolli @ 2007-04-21 15:11 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Chuck Ebbert, Stephen.Clark, Mark Lord, Tejun Heo, Alan Cox,
	7eggert, emisca, Bartlomiej Zolnierkiewicz, linux-kernel,
	linux-ide, Adrian Bunk, Andrew Morton

Jan,
mine does not pop running Linux but  only during the shutdown. As I
wrote before, switching from PATA to IDE has solved the problem for
me.
Regards,
Fabio


On 4/21/07, Jan Engelhardt <jengelh@linux01.gwdg.de> wrote:
>
> >On Apr 20 2007 21:57, Fabio Comolli wrote:
> >
> > hda: TOSHIBA MK8025GAS, ATA DISK drive
>
> MK...? These sort of disks do that stupid pop. Mine -- a MK2003GAH --
> does it even while running Linux, if the disk is _idle_.
> See http://lkml.org/lkml/2006/11/15/413 - hope it provides some pointers.
>
> Regards,
> Jan
> --
>

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-20 19:57                                         ` Fabio Comolli
  2007-04-21  9:45                                           ` emisca
@ 2007-04-21 14:33                                           ` Jan Engelhardt
  2007-04-21 15:11                                             ` Fabio Comolli
  1 sibling, 1 reply; 65+ messages in thread
From: Jan Engelhardt @ 2007-04-21 14:33 UTC (permalink / raw)
  To: Fabio Comolli
  Cc: Chuck Ebbert, Stephen.Clark, Mark Lord, Tejun Heo, Alan Cox,
	7eggert, emisca, Bartlomiej Zolnierkiewicz, linux-kernel,
	linux-ide, Adrian Bunk, Andrew Morton


>On Apr 20 2007 21:57, Fabio Comolli wrote:
>
> hda: TOSHIBA MK8025GAS, ATA DISK drive

MK...? These sort of disks do that stupid pop. Mine -- a MK2003GAH --
does it even while running Linux, if the disk is _idle_.
See http://lkml.org/lkml/2006/11/15/413 - hope it provides some pointers.

Regards,
Jan
-- 

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-21  9:45                                           ` emisca
@ 2007-04-21  9:50                                             ` Fabio Comolli
  0 siblings, 0 replies; 65+ messages in thread
From: Fabio Comolli @ 2007-04-21  9:50 UTC (permalink / raw)
  To: emisca
  Cc: Chuck Ebbert, Stephen.Clark, Mark Lord, Tejun Heo, Alan Cox,
	7eggert, Jan Engelhardt, Bartlomiej Zolnierkiewicz, linux-kernel,
	linux-ide, Adrian Bunk, Andrew Morton

Hi.

On 4/21/07, emisca <emisca.ml@gmail.com> wrote:
> So, removing -d halt option solves this problem?
>

According to the halt manpage, -n implies -d (in other words, -d is
not removed at all).
Regards,
Fabio

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-20 19:57                                         ` Fabio Comolli
@ 2007-04-21  9:45                                           ` emisca
  2007-04-21  9:50                                             ` Fabio Comolli
  2007-04-21 14:33                                           ` Jan Engelhardt
  1 sibling, 1 reply; 65+ messages in thread
From: emisca @ 2007-04-21  9:45 UTC (permalink / raw)
  To: Fabio Comolli
  Cc: Chuck Ebbert, Stephen.Clark, Mark Lord, Tejun Heo, Alan Cox,
	7eggert, Jan Engelhardt, Bartlomiej Zolnierkiewicz, linux-kernel,
	linux-ide, Adrian Bunk, Andrew Morton

So, removing -d halt option solves this problem?

2007/4/20, Fabio Comolli <fabio.comolli@gmail.com>:
> Bingo!
> I switched from ata_piix.c to piix_ide.c and the "pop" disappeared.
>
> I must say that the "pop" also disappeared after suspending to disk
> using suspend2 (obviously without executing halt -n -h -p) . In both
> cases it was present with the previous setup.
>
> This is with a pure PATA setup with no SATA ports and the disk is:
>
> hda: TOSHIBA MK8025GAS, ATA DISK drive
>
> Many thanks!
> regards,
> Fabio
>
>
>
>
> On 4/19/07, Chuck Ebbert <cebbert@redhat.com> wrote:
> > Stephen Clark wrote:
> > > Mark Lord wrote:
> > >
> > >> Mark Lord wrote:
> > >>
> > >>
> > >>> With the patch applied, I don't see *any* new activity in those
> > >>> S.M.A.R.T.
> > >>> attributes over multiple hibernates (Linux "suspend-to-disk").
> > >>>
> > >>
> > >> Scratch that -- operator failure.  ;)
> > >> The patch makes no difference over hibernates in the SMART logs.
> > >>
> > >> It's still logging extra Power-Off_Retract_Count pegs,
> > >> which it DID NOT USED TO DO not so long ago.
> > >>
> > >> Now I'll poke at the shutdown again.
> > >>
> > >> Meanwhile, Stephen:  Could you try without this line in the patched file:
> > >>
> > >>        case ATA_16:
> > >> +               dev->needs_sync_cache = 1;
> > >>
> > >> Ie. comment out that last "dev->needs_sync_cache" line.
> > >>
> > >>
> > > No joy - even with that line commented out I get a click and my
> > > Power-Off_Retract_Count has incremented.
> > >
> >
> > I found a solution of sorts on Fedora 6:
> >
> >
> > Edit /etc/rc0.d/S01halt, changing the third-from-last line so it reads:
> >
> > HALTARGS="-d -h -n"
> >
> > Then use the halt(8) command to shut down and turn off the power manually.
> > No click and the "retract" counter does not increment. (Even this procedure
> > incremented the counter until I changed the script.)
> >
> > Seems safe, using the IDE drivers, since they sync the cache anyway.
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
> >
>

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-19 17:50                                       ` Chuck Ebbert
  2007-04-20 12:15                                         ` Stephen Clark
@ 2007-04-20 19:57                                         ` Fabio Comolli
  2007-04-21  9:45                                           ` emisca
  2007-04-21 14:33                                           ` Jan Engelhardt
  1 sibling, 2 replies; 65+ messages in thread
From: Fabio Comolli @ 2007-04-20 19:57 UTC (permalink / raw)
  To: Chuck Ebbert
  Cc: Stephen.Clark, Mark Lord, Tejun Heo, Alan Cox, 7eggert, emisca,
	Jan Engelhardt, Bartlomiej Zolnierkiewicz, linux-kernel,
	linux-ide, Adrian Bunk, Andrew Morton

Bingo!
I switched from ata_piix.c to piix_ide.c and the "pop" disappeared.

I must say that the "pop" also disappeared after suspending to disk
using suspend2 (obviously without executing halt -n -h -p) . In both
cases it was present with the previous setup.

This is with a pure PATA setup with no SATA ports and the disk is:

hda: TOSHIBA MK8025GAS, ATA DISK drive

Many thanks!
regards,
Fabio




On 4/19/07, Chuck Ebbert <cebbert@redhat.com> wrote:
> Stephen Clark wrote:
> > Mark Lord wrote:
> >
> >> Mark Lord wrote:
> >>
> >>
> >>> With the patch applied, I don't see *any* new activity in those
> >>> S.M.A.R.T.
> >>> attributes over multiple hibernates (Linux "suspend-to-disk").
> >>>
> >>
> >> Scratch that -- operator failure.  ;)
> >> The patch makes no difference over hibernates in the SMART logs.
> >>
> >> It's still logging extra Power-Off_Retract_Count pegs,
> >> which it DID NOT USED TO DO not so long ago.
> >>
> >> Now I'll poke at the shutdown again.
> >>
> >> Meanwhile, Stephen:  Could you try without this line in the patched file:
> >>
> >>        case ATA_16:
> >> +               dev->needs_sync_cache = 1;
> >>
> >> Ie. comment out that last "dev->needs_sync_cache" line.
> >>
> >>
> > No joy - even with that line commented out I get a click and my
> > Power-Off_Retract_Count has incremented.
> >
>
> I found a solution of sorts on Fedora 6:
>
>
> Edit /etc/rc0.d/S01halt, changing the third-from-last line so it reads:
>
> HALTARGS="-d -h -n"
>
> Then use the halt(8) command to shut down and turn off the power manually.
> No click and the "retract" counter does not increment. (Even this procedure
> incremented the counter until I changed the script.)
>
> Seems safe, using the IDE drivers, since they sync the cache anyway.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-19 17:50                                       ` Chuck Ebbert
@ 2007-04-20 12:15                                         ` Stephen Clark
  2007-04-20 19:57                                         ` Fabio Comolli
  1 sibling, 0 replies; 65+ messages in thread
From: Stephen Clark @ 2007-04-20 12:15 UTC (permalink / raw)
  To: Chuck Ebbert
  Cc: Mark Lord, Tejun Heo, Alan Cox, 7eggert, emisca, Jan Engelhardt,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

Chuck Ebbert wrote:

>Stephen Clark wrote:
>  
>
>>Mark Lord wrote:
>>
>>    
>>
>>>Mark Lord wrote:
>>> 
>>>
>>>      
>>>
>>>>With the patch applied, I don't see *any* new activity in those
>>>>S.M.A.R.T.
>>>>attributes over multiple hibernates (Linux "suspend-to-disk").
>>>>  
>>>>        
>>>>
>>>Scratch that -- operator failure.  ;)
>>>The patch makes no difference over hibernates in the SMART logs.
>>>
>>>It's still logging extra Power-Off_Retract_Count pegs,
>>>which it DID NOT USED TO DO not so long ago.
>>>
>>>Now I'll poke at the shutdown again.
>>>
>>>Meanwhile, Stephen:  Could you try without this line in the patched file:
>>>
>>>       case ATA_16:
>>>+               dev->needs_sync_cache = 1;
>>>
>>>Ie. comment out that last "dev->needs_sync_cache" line.
>>>
>>>
>>>      
>>>
>>No joy - even with that line commented out I get a click and my
>>Power-Off_Retract_Count has incremented.
>>
>>    
>>
>
>I found a solution of sorts on Fedora 6:
>
>
>Edit /etc/rc0.d/S01halt, changing the third-from-last line so it reads:
>
>HALTARGS="-d -h -n"
>
>Then use the halt(8) command to shut down and turn off the power manually.
>No click and the "retract" counter does not increment. (Even this procedure
>incremented the counter until I changed the script.)
>
>Seems safe, using the IDE drivers, since they sync the cache anyway.
>
>
>  
>
Hi Chuck,

I got a chance to try this and it works for me also. No pop and my 
retract counter does not increment.

Steve

-- 

"They that give up essential liberty to obtain temporary safety, 
deserve neither liberty nor safety."  (Ben Franklin)

"The course of history shows that as a government grows, liberty 
decreases."  (Thomas Jefferson)




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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 17:46                                     ` Stephen Clark
@ 2007-04-19 17:50                                       ` Chuck Ebbert
  2007-04-20 12:15                                         ` Stephen Clark
  2007-04-20 19:57                                         ` Fabio Comolli
  0 siblings, 2 replies; 65+ messages in thread
From: Chuck Ebbert @ 2007-04-19 17:50 UTC (permalink / raw)
  To: Stephen.Clark
  Cc: Mark Lord, Tejun Heo, Alan Cox, 7eggert, emisca, Jan Engelhardt,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

Stephen Clark wrote:
> Mark Lord wrote:
> 
>> Mark Lord wrote:
>>  
>>
>>> With the patch applied, I don't see *any* new activity in those
>>> S.M.A.R.T.
>>> attributes over multiple hibernates (Linux "suspend-to-disk").
>>>   
>>
>> Scratch that -- operator failure.  ;)
>> The patch makes no difference over hibernates in the SMART logs.
>>
>> It's still logging extra Power-Off_Retract_Count pegs,
>> which it DID NOT USED TO DO not so long ago.
>>
>> Now I'll poke at the shutdown again.
>>
>> Meanwhile, Stephen:  Could you try without this line in the patched file:
>>
>>        case ATA_16:
>> +               dev->needs_sync_cache = 1;
>>
>> Ie. comment out that last "dev->needs_sync_cache" line.
>>
>>
> No joy - even with that line commented out I get a click and my
> Power-Off_Retract_Count has incremented.
> 

I found a solution of sorts on Fedora 6:


Edit /etc/rc0.d/S01halt, changing the third-from-last line so it reads:

HALTARGS="-d -h -n"

Then use the halt(8) command to shut down and turn off the power manually.
No click and the "retract" counter does not increment. (Even this procedure
incremented the counter until I changed the script.)

Seems safe, using the IDE drivers, since they sync the cache anyway.


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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-19 12:59                             ` Stephen Clark
@ 2007-04-19 13:32                               ` Mark Lord
  0 siblings, 0 replies; 65+ messages in thread
From: Mark Lord @ 2007-04-19 13:32 UTC (permalink / raw)
  To: Stephen.Clark
  Cc: Jan Engelhardt, Alan Cox, Tejun Heo, 7eggert, Chuck Ebbert,
	emisca, Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide,
	Adrian Bunk, Andrew Morton

Stephen Clark wrote:
>
> It is definitely the disk drive. It is located in the right front corner 
> of my laptop so I put my ear
> by it during shutdown and that is where the click is coming from.

Isn't there also a speaker located there?

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 23:25             ` Chuck Ebbert
@ 2007-04-19 13:30               ` emisca
  0 siblings, 0 replies; 65+ messages in thread
From: emisca @ 2007-04-19 13:30 UTC (permalink / raw)
  To: Chuck Ebbert; +Cc: Robert Hancock, Tejun Heo, linux-kernel, Mark Lord

>From the debian etch 4.0 /etc/init.d/halt script:

        # Don't shut down drives if we're using RAID.
        hddown="-h"
        if grep -qs '^md.*active' /proc/mdstat
        then
                hddown=""
        fi

        # If INIT_HALT=HALT don't poweroff.
        poweroff="-p"
        if [ "$INIT_HALT" = "HALT" ]
        then
                poweroff=""
        fi

        # Make it possible to not shut down network interfaces,
        # needed to use wake-on-lan
        netdown="-i"
        if [ "$NETDOWN" = "no" ]; then
                netdown=""
        fi

        log_action_msg "Will now halt"
        halt -d -f $netdown $poweroff $hddown

So it will always call halt -d when doing shutdown. I've also noticed
that doing suspend to disk, the drive don't spins up two times. Next
shutdown I'll try to remove the -d option and I'll report what it
does....

2007/4/19, Chuck Ebbert <cebbert@redhat.com>:
> Robert Hancock wrote:
> > Tejun Heo wrote:
> >> This really isn't a regression.  It's been always like that with libata.
> >>  libata doesn't make devices go into standby mode and shutdown(8) does
> >> it for libata.  The problem here is that libata does issue
> >> SYNCHRONIZE_CACHE on shutdown.  So, the sequence of event is...
> >>
> >> 1. shutdown(8) issues SYNCHRONIZE_CACHE followed by STANDBY_NOW
> >
> > This part is presumably distribution dependent. I have never seen Fedora
> > or CentOS shut down drives on power down from the shutdown script/utility..
> >
>
> Some distro shutdown scripts must be doing "halt -h" at shutdown time.
>
> -n : don't sync cache (default is to sync)
> -h : put harddrives in standby (default is no standby)
>
> And BTW not put them in sleep instead of standby (whether it's
> the halt program or the kernel?) They won't wake up from that
> until they're reset.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-19  7:18                           ` Jan Engelhardt
@ 2007-04-19 12:59                             ` Stephen Clark
  2007-04-19 13:32                               ` Mark Lord
  0 siblings, 1 reply; 65+ messages in thread
From: Stephen Clark @ 2007-04-19 12:59 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Alan Cox, Tejun Heo, 7eggert, Chuck Ebbert, emisca,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

Jan Engelhardt wrote:

>On Apr 18 2007 09:39, Stephen Clark wrote:
>  
>
>>So this is the pop I hear on my new laptop that is using
>>libata=combined_mode when I shut my system down. I didn't get the
>>pop with the same disk drive in an older laptop that was only ide.
>>It sounds like a relay closing or opening, but is really my drive
>>head doing an emergency retract/park?
>>    
>>
>
>Most(?) disks' heads are spring-/power-based so that whenever
>they lose power, the spring retracts the head back to the park zone.
>
>Whether it is the disk head or something else.. take out the disk,
>and retry. Might not be that easy with laptops, though.
>
>
>Jan
>  
>
It is definitely the disk drive. It is located in the right front corner 
of my laptop so I put my ear
by it during shutdown and that is where the click is coming from. As I 
said before I had this same
drive in another laptop that was strictly ide so it used the older ide 
driver and it never did this.

Steve

-- 

"They that give up essential liberty to obtain temporary safety, 
deserve neither liberty nor safety."  (Ben Franklin)

"The course of history shows that as a government grows, liberty 
decreases."  (Thomas Jefferson)




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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 13:39                         ` Stephen Clark
@ 2007-04-19  7:18                           ` Jan Engelhardt
  2007-04-19 12:59                             ` Stephen Clark
  0 siblings, 1 reply; 65+ messages in thread
From: Jan Engelhardt @ 2007-04-19  7:18 UTC (permalink / raw)
  To: Stephen Clark
  Cc: Alan Cox, Tejun Heo, 7eggert, Chuck Ebbert, emisca,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton


On Apr 18 2007 09:39, Stephen Clark wrote:
>>
> So this is the pop I hear on my new laptop that is using
> libata=combined_mode when I shut my system down. I didn't get the
> pop with the same disk drive in an older laptop that was only ide.
> It sounds like a relay closing or opening, but is really my drive
> head doing an emergency retract/park?

Most(?) disks' heads are spring-/power-based so that whenever
they lose power, the spring retracts the head back to the park zone.

Whether it is the disk head or something else.. take out the disk,
and retry. Might not be that easy with laptops, though.


Jan
-- 

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 23:36               ` Mark Lord
@ 2007-04-18 23:51                 ` Mark Lord
  0 siblings, 0 replies; 65+ messages in thread
From: Mark Lord @ 2007-04-18 23:51 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Chuck Ebbert, emisca, Jan Engelhardt, Bartlomiej Zolnierkiewicz,
	linux-kernel, linux-ide, Adrian Bunk, Andrew Morton,
	Stephen.Clark

Mark Lord wrote:
> Tejun Heo wrote:
>>
>> 1. shutdown(8) issues SYNCHRONIZE_CACHE followed by STANDBY_NOW
>> 2. kernel shutdown starts
>> 3. libata shutdown issues SYNCHRONIZE_CACHE
>> 4. power goes off
> 
> Okay, after some experimentatino, it's the STANDBY_NOW that
> is causing the Power-Off_Retract_Count to increment on my machine.
> 
> Tell me again why we think we need to issue that command ?

Arghh.. okay, removing that from the code has no effect on it either.
I just don't understand the problem any more, since I don't actually
have it here (I think).

Can somebody explain again what the issue was, when it began happening,
and whatever else?  And what Tejun's fix (2.6.22) does again?

I've lost all of the early postings.

Thanks

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18  5:39             ` Tejun Heo
  2007-04-18 21:31               ` Bartlomiej Zolnierkiewicz
@ 2007-04-18 23:36               ` Mark Lord
  2007-04-18 23:51                 ` Mark Lord
  1 sibling, 1 reply; 65+ messages in thread
From: Mark Lord @ 2007-04-18 23:36 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Chuck Ebbert, emisca, Jan Engelhardt, Bartlomiej Zolnierkiewicz,
	linux-kernel, linux-ide, Adrian Bunk, Andrew Morton,
	Stephen.Clark

Tejun Heo wrote:
> 
> 1. shutdown(8) issues SYNCHRONIZE_CACHE followed by STANDBY_NOW
> 2. kernel shutdown starts
> 3. libata shutdown issues SYNCHRONIZE_CACHE
> 4. power goes off

Okay, after some experimentatino, it's the STANDBY_NOW that
is causing the Power-Off_Retract_Count to increment on my machine.

Tell me again why we think we need to issue that command ?

Thanks.

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 23:00           ` Robert Hancock
@ 2007-04-18 23:25             ` Chuck Ebbert
  2007-04-19 13:30               ` emisca
  0 siblings, 1 reply; 65+ messages in thread
From: Chuck Ebbert @ 2007-04-18 23:25 UTC (permalink / raw)
  To: Robert Hancock; +Cc: Tejun Heo, linux-kernel, Mark Lord

Robert Hancock wrote:
> Tejun Heo wrote:
>> This really isn't a regression.  It's been always like that with libata.
>>  libata doesn't make devices go into standby mode and shutdown(8) does
>> it for libata.  The problem here is that libata does issue
>> SYNCHRONIZE_CACHE on shutdown.  So, the sequence of event is...
>>
>> 1. shutdown(8) issues SYNCHRONIZE_CACHE followed by STANDBY_NOW
> 
> This part is presumably distribution dependent. I have never seen Fedora
> or CentOS shut down drives on power down from the shutdown script/utility..
> 

Some distro shutdown scripts must be doing "halt -h" at shutdown time.

-n : don't sync cache (default is to sync)
-h : put harddrives in standby (default is no standby)

And BTW not put them in sleep instead of standby (whether it's
the halt program or the kernel?) They won't wake up from that
until they're reset.


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

* Re: Loud "pop" coming from hard drive on reboot
       [not found]         ` <fa.jDn5j5GVDwXXnVYH74vVT3m+Gq8@ifi.uio.no>
@ 2007-04-18 23:00           ` Robert Hancock
  2007-04-18 23:25             ` Chuck Ebbert
  0 siblings, 1 reply; 65+ messages in thread
From: Robert Hancock @ 2007-04-18 23:00 UTC (permalink / raw)
  To: Tejun Heo, linux-kernel; +Cc: Mark Lord

Tejun Heo wrote:
> This really isn't a regression.  It's been always like that with libata.
>  libata doesn't make devices go into standby mode and shutdown(8) does
> it for libata.  The problem here is that libata does issue
> SYNCHRONIZE_CACHE on shutdown.  So, the sequence of event is...
> 
> 1. shutdown(8) issues SYNCHRONIZE_CACHE followed by STANDBY_NOW

This part is presumably distribution dependent. I have never seen Fedora 
or CentOS shut down drives on power down from the shutdown script/utility..

> 2. kernel shutdown starts
> 3. libata shutdown issues SYNCHRONIZE_CACHE
> 4. power goes off
> 
> Some drives seem to spin up at step #3 even when its cache is clean and
> power goes off right after the disk finishes the command.  So, it's
> really bad when it happens - spin down, spin up followed by immediate
> power off.

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


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

* Re: Loud "pop" coming from hard drive on reboot
       [not found]         ` <fa.kwrK207qOU0rARQuJJKqsJ7Nk4w@ifi.uio.no>
@ 2007-04-18 22:58           ` Robert Hancock
  0 siblings, 0 replies; 65+ messages in thread
From: Robert Hancock @ 2007-04-18 22:58 UTC (permalink / raw)
  To: Stephen.Clark, linux-kernel; +Cc: Alan Cox

Stephen Clark wrote:
> So this is the pop I hear on my new laptop that is using 
> libata=combined_mode
> when I shut my system down. I didn't get the pop with the same disk 
> drive in an older
> laptop that was only ide. It sounds like a relay closing or opening, but 
> is really my
> drive head doing an emergency retract/park?

Yes, that would be what it is, and why.

I would vote that the sd stop-on-shutdown patch should go in, and 
possibly with the new behavior enabled by default. Surely the number of 
people running Linux on a laptop (or any other system with load/unload 
head technology drives) is much greater than the number of people 
running a SAN, multi-initiator, etc. environment where you might not 
want this..

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18  5:39             ` Tejun Heo
@ 2007-04-18 21:31               ` Bartlomiej Zolnierkiewicz
  2007-04-18 23:36               ` Mark Lord
  1 sibling, 0 replies; 65+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-04-18 21:31 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Mark Lord, Chuck Ebbert, emisca, Jan Engelhardt, linux-kernel,
	linux-ide, Adrian Bunk, Andrew Morton


On Wednesday 18 April 2007, Tejun Heo wrote:
> Mark Lord wrote:
> > Chuck Ebbert wrote:
> >> Mark Lord wrote:
> >>> I'll patch it locally on my own machines, but what about the tens
> >>> of thousands of other Seagate notebook drive owners out there?
> >>>
> >>
> >> This is a problem with Seagate specifically, spinning back up
> >> on receipt of some command after spindown?
> > 
> > No, they just seem to be affected worse by it than some other brands.
> > The bug is that libata/SCSI now spin-down the drive before the distro's
> > scripts are done with it, so it spins down, and then gets spun up again
> > by the distro, and then spun down again by the distro.
> > 
> > And along the way, one/both of the two causes a full mechanism "park",
> > which is hard on things if abused (like this).
> > 
> > Or at least that's what I recall for it.  Tejun?
> 
> This really isn't a regression.  It's been always like that with libata.

Tejun, it is a regression over IDE subsystem
(so all PATA and some SATA also).

Dave/Chuck, this also seems like a FC7 regression
(because of the libata PATA switch).

>  libata doesn't make devices go into standby mode and shutdown(8) does
> it for libata.  The problem here is that libata does issue
> SYNCHRONIZE_CACHE on shutdown.  So, the sequence of event is...
> 
> 1. shutdown(8) issues SYNCHRONIZE_CACHE followed by STANDBY_NOW
> 2. kernel shutdown starts
> 3. libata shutdown issues SYNCHRONIZE_CACHE
> 4. power goes off
> 
> Some drives seem to spin up at step #3 even when its cache is clean and
> power goes off right after the disk finishes the command.  So, it's
> really bad when it happens - spin down, spin up followed by immediate
> power off.
> 
> SCSI part of the fix is queued in scsi-misc-2.6 tree and libata-dev part
> is acked and waiting to be merged, so the fix will be available in
> 2.6.22.  However, it's disabled by default to remain compatible with the
> current behavior and requires userland change to fully fix the problem.

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 21:22                                       ` Bartlomiej Zolnierkiewicz
  2007-04-18 21:27                                         ` Chuck Ebbert
@ 2007-04-18 21:29                                         ` Greg Freemyer
  1 sibling, 0 replies; 65+ messages in thread
From: Greg Freemyer @ 2007-04-18 21:29 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Chuck Ebbert, Mark Lord, Stephen.Clark, Tejun Heo, Alan Cox,
	7eggert, emisca, Jan Engelhardt, linux-kernel, linux-ide,
	Adrian Bunk, Andrew Morton

On 4/18/07, Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
>
> On Wednesday 18 April 2007, Chuck Ebbert wrote:
> > Mark Lord wrote:
> > > Mark Lord wrote:
> > >>
> > >> With the patch applied, I don't see *any* new activity in those
> > >> S.M.A.R.T.
> > >> attributes over multiple hibernates (Linux "suspend-to-disk").
> > >
> > > Scratch that -- operator failure.  ;)
> > > The patch makes no difference over hibernates in the SMART logs.
> > >
> > > It's still logging extra Power-Off_Retract_Count pegs,
> > > which it DID NOT USED TO DO not so long ago.
> > >
> >
> > Just to add to the fun, my problems are happening with the "old"
> > IDE drivers...
>
> The issue you are experiencing results in the same problem (disk doing
> power off retract) but it has a totally different root cause - your notebook
> loses power on reboot.  It is actually a hardware problem and as you have
> reported the same problem is present when using "the other" OS.
>
> I think that the issue needs to be fixed (by detecting affected notebook(s)
> using DMI?) in Linux PM handling and not in IDE subsystem because:
>
> * there may be some other hardware devices affected by the power loss
>   (== they require shutdown sequence)
>
> * the same problem will bite if somebody decides to use libata (FC7?)
>
> Bart

OpenSUSE 10.3 is still in Alpha stage (at least a few months away from
release), but they too have switched to libata by default.  (You can
override by adding a boot param).

Greg
-- 
Greg Freemyer
The Norcross Group
Forensics for the 21st Century

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 21:22                                       ` Bartlomiej Zolnierkiewicz
@ 2007-04-18 21:27                                         ` Chuck Ebbert
  2007-04-21 23:20                                           ` Peter Zijlstra
  2007-04-18 21:29                                         ` Greg Freemyer
  1 sibling, 1 reply; 65+ messages in thread
From: Chuck Ebbert @ 2007-04-18 21:27 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Mark Lord, Stephen.Clark, Tejun Heo, Alan Cox, 7eggert, emisca,
	Jan Engelhardt, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

Bartlomiej Zolnierkiewicz wrote:
> On Wednesday 18 April 2007, Chuck Ebbert wrote:
>> Mark Lord wrote:
>>> Mark Lord wrote:
>>>> With the patch applied, I don't see *any* new activity in those
>>>> S.M.A.R.T.
>>>> attributes over multiple hibernates (Linux "suspend-to-disk").
>>> Scratch that -- operator failure.  ;)
>>> The patch makes no difference over hibernates in the SMART logs.
>>>
>>> It's still logging extra Power-Off_Retract_Count pegs,
>>> which it DID NOT USED TO DO not so long ago.
>>>
>> Just to add to the fun, my problems are happening with the "old"
>> IDE drivers...
> 
> The issue you are experiencing results in the same problem (disk doing
> power off retract) but it has a totally different root cause - your notebook
> loses power on reboot.  It is actually a hardware problem and as you have
> reported the same problem is present when using "the other" OS.
> 

My "power off retract count" increases whether I do a halt/poweroff or
a reboot. The only difference is the volume of the noise.

And I just noticed my "seek error rate" is increasing.

/me plans purchase of another drive, definitely not Seagate...

> I think that the issue needs to be fixed (by detecting affected notebook(s)
> using DMI?) in Linux PM handling and not in IDE subsystem because:
>
> * there may be some other hardware devices affected by the power loss
>   (== they require shutdown sequence)
>
> * the same problem will bite if somebody decides to use libata (FC7?)

Yeah, this needs fixing too. I've been playing with another notebook and
the power does stay on during reboot, so I wonder how widespread the problem is?

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 17:46                                     ` Chuck Ebbert
@ 2007-04-18 21:22                                       ` Bartlomiej Zolnierkiewicz
  2007-04-18 21:27                                         ` Chuck Ebbert
  2007-04-18 21:29                                         ` Greg Freemyer
  0 siblings, 2 replies; 65+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-04-18 21:22 UTC (permalink / raw)
  To: Chuck Ebbert
  Cc: Mark Lord, Stephen.Clark, Tejun Heo, Alan Cox, 7eggert, emisca,
	Jan Engelhardt, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton


On Wednesday 18 April 2007, Chuck Ebbert wrote:
> Mark Lord wrote:
> > Mark Lord wrote:
> >>
> >> With the patch applied, I don't see *any* new activity in those
> >> S.M.A.R.T.
> >> attributes over multiple hibernates (Linux "suspend-to-disk").
> > 
> > Scratch that -- operator failure.  ;)
> > The patch makes no difference over hibernates in the SMART logs.
> > 
> > It's still logging extra Power-Off_Retract_Count pegs,
> > which it DID NOT USED TO DO not so long ago.
> > 
> 
> Just to add to the fun, my problems are happening with the "old"
> IDE drivers...

The issue you are experiencing results in the same problem (disk doing
power off retract) but it has a totally different root cause - your notebook
loses power on reboot.  It is actually a hardware problem and as you have
reported the same problem is present when using "the other" OS.

I think that the issue needs to be fixed (by detecting affected notebook(s)
using DMI?) in Linux PM handling and not in IDE subsystem because:

* there may be some other hardware devices affected by the power loss
  (== they require shutdown sequence)

* the same problem will bite if somebody decides to use libata (FC7?)

Bart

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 17:19                                   ` Mark Lord
  2007-04-18 17:46                                     ` Chuck Ebbert
@ 2007-04-18 17:46                                     ` Stephen Clark
  2007-04-19 17:50                                       ` Chuck Ebbert
  1 sibling, 1 reply; 65+ messages in thread
From: Stephen Clark @ 2007-04-18 17:46 UTC (permalink / raw)
  To: Mark Lord
  Cc: Tejun Heo, Alan Cox, 7eggert, Chuck Ebbert, emisca,
	Jan Engelhardt, Bartlomiej Zolnierkiewicz, linux-kernel,
	linux-ide, Adrian Bunk, Andrew Morton

Mark Lord wrote:

>Mark Lord wrote:
>  
>
>>With the patch applied, I don't see *any* new activity in those S.M.A.R.T.
>>attributes over multiple hibernates (Linux "suspend-to-disk").
>>    
>>
>
>Scratch that -- operator failure.  ;)
>The patch makes no difference over hibernates in the SMART logs.
>
>It's still logging extra Power-Off_Retract_Count pegs,
>which it DID NOT USED TO DO not so long ago.
>
>Now I'll poke at the shutdown again.
>
>Meanwhile, Stephen:  Could you try without this line in the patched file:
>
>        case ATA_16:
>+               dev->needs_sync_cache = 1;
>
>Ie. comment out that last "dev->needs_sync_cache" line.
>
>Cheers
>-
>To unsubscribe from this list: send the line "unsubscribe linux-ide" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>  
>
No joy - even with that line commented out I get a click and my
Power-Off_Retract_Count has incremented.

Steve

-- 

"They that give up essential liberty to obtain temporary safety, 
deserve neither liberty nor safety."  (Ben Franklin)

"The course of history shows that as a government grows, liberty 
decreases."  (Thomas Jefferson)




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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 17:19                                   ` Mark Lord
@ 2007-04-18 17:46                                     ` Chuck Ebbert
  2007-04-18 21:22                                       ` Bartlomiej Zolnierkiewicz
  2007-04-18 17:46                                     ` Stephen Clark
  1 sibling, 1 reply; 65+ messages in thread
From: Chuck Ebbert @ 2007-04-18 17:46 UTC (permalink / raw)
  To: Mark Lord
  Cc: Stephen.Clark, Tejun Heo, Alan Cox, 7eggert, emisca,
	Jan Engelhardt, Bartlomiej Zolnierkiewicz, linux-kernel,
	linux-ide, Adrian Bunk, Andrew Morton

Mark Lord wrote:
> Mark Lord wrote:
>>
>> With the patch applied, I don't see *any* new activity in those
>> S.M.A.R.T.
>> attributes over multiple hibernates (Linux "suspend-to-disk").
> 
> Scratch that -- operator failure.  ;)
> The patch makes no difference over hibernates in the SMART logs.
> 
> It's still logging extra Power-Off_Retract_Count pegs,
> which it DID NOT USED TO DO not so long ago.
> 

Just to add to the fun, my problems are happening with the "old"
IDE drivers...

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 17:08                                 ` Mark Lord
@ 2007-04-18 17:19                                   ` Mark Lord
  2007-04-18 17:46                                     ` Chuck Ebbert
  2007-04-18 17:46                                     ` Stephen Clark
  0 siblings, 2 replies; 65+ messages in thread
From: Mark Lord @ 2007-04-18 17:19 UTC (permalink / raw)
  To: Stephen.Clark
  Cc: Tejun Heo, Alan Cox, 7eggert, Chuck Ebbert, emisca,
	Jan Engelhardt, Bartlomiej Zolnierkiewicz, linux-kernel,
	linux-ide, Adrian Bunk, Andrew Morton

Mark Lord wrote:
> 
> With the patch applied, I don't see *any* new activity in those S.M.A.R.T.
> attributes over multiple hibernates (Linux "suspend-to-disk").

Scratch that -- operator failure.  ;)
The patch makes no difference over hibernates in the SMART logs.

It's still logging extra Power-Off_Retract_Count pegs,
which it DID NOT USED TO DO not so long ago.

Now I'll poke at the shutdown again.

Meanwhile, Stephen:  Could you try without this line in the patched file:

        case ATA_16:
+               dev->needs_sync_cache = 1;

Ie. comment out that last "dev->needs_sync_cache" line.

Cheers

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 15:25                               ` Tejun Heo
@ 2007-04-18 17:08                                 ` Mark Lord
  2007-04-18 17:19                                   ` Mark Lord
  0 siblings, 1 reply; 65+ messages in thread
From: Mark Lord @ 2007-04-18 17:08 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Alan Cox, 7eggert, Chuck Ebbert, emisca, Jan Engelhardt,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

Tejun Heo wrote:
> Mark Lord wrote:
> ..
>> It would be nice if somebody who can hear the "pop" would also test this,
>> as it will confirm that this is a complete fix for the problem.
> 
> You'll probably be able to here the "pop" on sleep-to-disk.
> 
>> My "pop" drives are busy elsewhere right now.

The system I do have to test with has a "pop",
but that's from the speakers not the drive.

However, the S.M.A.R.T. data was also shown earlier to provide
a record of the unnecessary wear and tear.

Here it is from two hibernates (Linux "suspend-to-disk") before patching:

-  4 Start_Stop_Count        0x0032   099   099   020    Old_age   Always       -       1711
+  4 Start_Stop_Count        0x0032   099   099   020    Old_age   Always       -       1712
..
- 12 Power_Cycle_Count       0x0032   099   099   020    Old_age   Always       -       1051
+ 12 Power_Cycle_Count       0x0032   099   099   020    Old_age   Always       -       1053
..
-192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       126
-193 Load_Cycle_Count        0x0032   015   015   000    Old_age   Always       -       170404
+192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       128
+193 Load_Cycle_Count        0x0032   015   015   000    Old_age   Always       -       170405

With the patch applied, I don't see *any* new activity in those S.M.A.R.T.
attributes over multiple hibernates (Linux "suspend-to-disk").

Next up, I'll try a few shutdowns and see.

But we should still get Stephen Clark or one of the other reporters
to confirm it on their systems.

-ml


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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 15:16                             ` Mark Lord
  2007-04-18 15:25                               ` Tejun Heo
@ 2007-04-18 17:04                               ` Stephen Clark
  1 sibling, 0 replies; 65+ messages in thread
From: Stephen Clark @ 2007-04-18 17:04 UTC (permalink / raw)
  To: Mark Lord
  Cc: Alan Cox, Tejun Heo, 7eggert, Chuck Ebbert, emisca,
	Jan Engelhardt, Bartlomiej Zolnierkiewicz, linux-kernel,
	linux-ide, Adrian Bunk, Andrew Morton

Mark Lord wrote:

>Alan Cox wrote:
>  
>
>>>+		if (dev->needs_flush && ata_try_flush_cache(dev)) {
>>> 			return ata_scsi_flush_xlat;
>>>+			dev->needs_flush = 0;
>>>      
>>>
>>Works better if you swap the dev-> and return lines
>>    
>>
>
>Heh, yeah, I noticed that!
>
>Here it is, *tested* now, with another fix.
>
>It would be nice if somebody who can hear the "pop" would also test this,
>as it will confirm that this is a complete fix for the problem.
>My "pop" drives are busy elsewhere right now.
>
>Tejun might use something like this, or do something better in libata-core,
>but it's still helpful to have confirmation that we're on the right track.
>
>This patch eliminates the redundant "SYNCHRONIZE_CACHE" request at shutdown
>which is causing undue wear/tear/alarm to various systems.
>
>Signed-off-by: Mark Lord <mlord@pobox.com>
>---
>--- old/include/linux/libata.h	2007-04-18 10:30:25.000000000 -0400
>+++ linux/include/linux/libata.h	2007-04-18 10:30:28.000000000 -0400
>@@ -499,6 +499,7 @@
> 	struct ata_ering	ering;
> 	int			spdn_cnt;
> 	unsigned int		horkage;	/* List of broken features */
>+	int			needs_sync_cache; /* 0==sync-cache not needed */
> #ifdef CONFIG_SATA_ACPI
> 	/* ACPI objects info */
> 	acpi_handle obj_handle;
>--- old/drivers/ata/libata-scsi.c	2007-04-18 10:48:34.000000000 -0400
>+++ linux/drivers/ata/libata-scsi.c	2007-04-18 10:51:09.000000000 -0400
>@@ -2749,18 +2749,20 @@
> 			return atapi_xlat;
> 
> 	switch (cmd) {
>-	case READ_6:
>-	case READ_10:
>-	case READ_16:
>-
> 	case WRITE_6:
> 	case WRITE_10:
> 	case WRITE_16:
>+		dev->needs_sync_cache = 1;
>+	case READ_6:
>+	case READ_10:
>+	case READ_16:
> 		return ata_scsi_rw_xlat;
> 
> 	case SYNCHRONIZE_CACHE:
>-		if (ata_try_flush_cache(dev))
>+		if (dev->needs_sync_cache && ata_try_flush_cache(dev)) {
>+			dev->needs_sync_cache = 0;
> 			return ata_scsi_flush_xlat;
>+		}
> 		break;
> 
> 	case VERIFY:
>@@ -2769,6 +2771,7 @@
> 
> 	case ATA_12:
> 	case ATA_16:
>+		dev->needs_sync_cache = 1;
> 		return ata_scsi_pass_thru;
> 
> 	case START_STOP:
>-
>To unsubscribe from this list: send the line "unsubscribe linux-ide" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>  
>
I tried this on 2.6.20.2 it applied to libata with some fuzz and I had 
to manually edit libata.h
When I did a shutdown I still got the click/pop.

I also noticed the last thing displayed on the lcd before it goes blank is
Synchronizing SCSI Disks - then the click/pop.

HTH,
Steve

-- 

"They that give up essential liberty to obtain temporary safety, 
deserve neither liberty nor safety."  (Ben Franklin)

"The course of history shows that as a government grows, liberty 
decreases."  (Thomas Jefferson)

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 15:16                             ` Mark Lord
@ 2007-04-18 15:25                               ` Tejun Heo
  2007-04-18 17:08                                 ` Mark Lord
  2007-04-18 17:04                               ` Stephen Clark
  1 sibling, 1 reply; 65+ messages in thread
From: Tejun Heo @ 2007-04-18 15:25 UTC (permalink / raw)
  To: Mark Lord
  Cc: Alan Cox, 7eggert, Chuck Ebbert, emisca, Jan Engelhardt,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

Mark Lord wrote:
> Alan Cox wrote:
>>> +        if (dev->needs_flush && ata_try_flush_cache(dev)) {
>>>              return ata_scsi_flush_xlat;
>>> +            dev->needs_flush = 0;
>>
>> Works better if you swap the dev-> and return lines
> 
> Heh, yeah, I noticed that!
> 
> Here it is, *tested* now, with another fix.
> 
> It would be nice if somebody who can hear the "pop" would also test this,
> as it will confirm that this is a complete fix for the problem.

You'll probably be able to here the "pop" on sleep-to-disk.

> My "pop" drives are busy elsewhere right now.
> 
> Tejun might use something like this, or do something better in libata-core,
> but it's still helpful to have confirmation that we're on the right track.

Yeap, I was thinking about more conservative check but this looks simple
and sweet.  :-)

-- 
tejun

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 15:06                           ` Alan Cox
@ 2007-04-18 15:16                             ` Mark Lord
  2007-04-18 15:25                               ` Tejun Heo
  2007-04-18 17:04                               ` Stephen Clark
  0 siblings, 2 replies; 65+ messages in thread
From: Mark Lord @ 2007-04-18 15:16 UTC (permalink / raw)
  To: Alan Cox
  Cc: Tejun Heo, 7eggert, Chuck Ebbert, emisca, Jan Engelhardt,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

Alan Cox wrote:
>> +		if (dev->needs_flush && ata_try_flush_cache(dev)) {
>>  			return ata_scsi_flush_xlat;
>> +			dev->needs_flush = 0;
> 
> Works better if you swap the dev-> and return lines

Heh, yeah, I noticed that!

Here it is, *tested* now, with another fix.

It would be nice if somebody who can hear the "pop" would also test this,
as it will confirm that this is a complete fix for the problem.
My "pop" drives are busy elsewhere right now.

Tejun might use something like this, or do something better in libata-core,
but it's still helpful to have confirmation that we're on the right track.

This patch eliminates the redundant "SYNCHRONIZE_CACHE" request at shutdown
which is causing undue wear/tear/alarm to various systems.

Signed-off-by: Mark Lord <mlord@pobox.com>
---
--- old/include/linux/libata.h	2007-04-18 10:30:25.000000000 -0400
+++ linux/include/linux/libata.h	2007-04-18 10:30:28.000000000 -0400
@@ -499,6 +499,7 @@
 	struct ata_ering	ering;
 	int			spdn_cnt;
 	unsigned int		horkage;	/* List of broken features */
+	int			needs_sync_cache; /* 0==sync-cache not needed */
 #ifdef CONFIG_SATA_ACPI
 	/* ACPI objects info */
 	acpi_handle obj_handle;
--- old/drivers/ata/libata-scsi.c	2007-04-18 10:48:34.000000000 -0400
+++ linux/drivers/ata/libata-scsi.c	2007-04-18 10:51:09.000000000 -0400
@@ -2749,18 +2749,20 @@
 			return atapi_xlat;
 
 	switch (cmd) {
-	case READ_6:
-	case READ_10:
-	case READ_16:
-
 	case WRITE_6:
 	case WRITE_10:
 	case WRITE_16:
+		dev->needs_sync_cache = 1;
+	case READ_6:
+	case READ_10:
+	case READ_16:
 		return ata_scsi_rw_xlat;
 
 	case SYNCHRONIZE_CACHE:
-		if (ata_try_flush_cache(dev))
+		if (dev->needs_sync_cache && ata_try_flush_cache(dev)) {
+			dev->needs_sync_cache = 0;
 			return ata_scsi_flush_xlat;
+		}
 		break;
 
 	case VERIFY:
@@ -2769,6 +2771,7 @@
 
 	case ATA_12:
 	case ATA_16:
+		dev->needs_sync_cache = 1;
 		return ata_scsi_pass_thru;
 
 	case START_STOP:

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 14:32                         ` Mark Lord
  2007-04-18 14:35                           ` Mark Lord
@ 2007-04-18 15:06                           ` Alan Cox
  2007-04-18 15:16                             ` Mark Lord
  1 sibling, 1 reply; 65+ messages in thread
From: Alan Cox @ 2007-04-18 15:06 UTC (permalink / raw)
  To: Mark Lord
  Cc: Tejun Heo, 7eggert, Chuck Ebbert, emisca, Jan Engelhardt,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

> +		if (dev->needs_flush && ata_try_flush_cache(dev)) {
>  			return ata_scsi_flush_xlat;
> +			dev->needs_flush = 0;

Works better if you swap the dev-> and return lines

Alan

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 14:32                         ` Mark Lord
@ 2007-04-18 14:35                           ` Mark Lord
  2007-04-18 15:06                           ` Alan Cox
  1 sibling, 0 replies; 65+ messages in thread
From: Mark Lord @ 2007-04-18 14:35 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Alan Cox, 7eggert, Chuck Ebbert, emisca, Jan Engelhardt,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

Mark Lord wrote:
> Alan Cox wrote:
>>
>> If you see a synchronize cache succeed and you then see the drive
>> shutdown succeed then you know that a sync cache can be faked as ok
>> safely. Any other command in between or after and it doesn't get faked
>>
>> This seems pretty easy to deal with at command issue.
> 
> Yup.  It could be as trivial as this (untested, and not as nice
> as Alan's full suggestion).

Here it is again, without the borked pathnames.

Signed-off-by:  Mark Lord <mlord@pobox.com>
---
--- old/include/linux/libata.h	2007-04-18 10:30:25.000000000 -0400
+++ linux/include/linux/libata.h	2007-04-18 10:30:28.000000000 -0400
@@ -499,6 +499,7 @@
 	struct ata_ering	ering;
 	int			spdn_cnt;
 	unsigned int		horkage;	/* List of broken features */
+	int			needs_flush;	/* bool: 1==written since last flush */
 #ifdef CONFIG_SATA_ACPI
 	/* ACPI objects info */
 	acpi_handle obj_handle;
--- old/drivers/ata/libata-scsi.c	2007-04-17 22:11:12.000000000 -0400
+++ linux/drivers/ata/libata-scsi.c	2007-04-18 10:27:29.000000000 -0400
@@ -2749,18 +2749,20 @@
 			return atapi_xlat;
 
 	switch (cmd) {
-	case READ_6:
-	case READ_10:
-	case READ_16:
-
 	case WRITE_6:
 	case WRITE_10:
 	case WRITE_16:
+		dev->needs_flush = 1;
+	case READ_6:
+	case READ_10:
+	case READ_16:
 		return ata_scsi_rw_xlat;
 
 	case SYNCHRONIZE_CACHE:
-		if (ata_try_flush_cache(dev))
+		if (dev->needs_flush && ata_try_flush_cache(dev)) {
 			return ata_scsi_flush_xlat;
+			dev->needs_flush = 0;
+		}
 		break;
 
 	case VERIFY:

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 13:03                       ` Alan Cox
  2007-04-18 13:05                         ` Tejun Heo
  2007-04-18 13:39                         ` Stephen Clark
@ 2007-04-18 14:32                         ` Mark Lord
  2007-04-18 14:35                           ` Mark Lord
  2007-04-18 15:06                           ` Alan Cox
  2 siblings, 2 replies; 65+ messages in thread
From: Mark Lord @ 2007-04-18 14:32 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Alan Cox, 7eggert, Chuck Ebbert, emisca, Jan Engelhardt,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

Alan Cox wrote:
>
> If you see a synchronize cache succeed and you then see the drive
> shutdown succeed then you know that a sync cache can be faked as ok
> safely. Any other command in between or after and it doesn't get faked
> 
> This seems pretty easy to deal with at command issue.

Yup.  It could be as trivial as this (untested, and not as nice
as Alan's full suggestion).

Signed-off-by:  Mark Lord <mlord@pobox.com>
---
--- linux/include/linux/libata.h.orig	2007-04-18 10:30:25.000000000 -0400
+++ linux/include/linux/libata.h	2007-04-18 10:30:28.000000000 -0400
@@ -499,6 +499,7 @@
 	struct ata_ering	ering;
 	int			spdn_cnt;
 	unsigned int		horkage;	/* List of broken features */
+	int			needs_flush;	/* bool: 1==written since last flush */
 #ifdef CONFIG_SATA_ACPI
 	/* ACPI objects info */
 	acpi_handle obj_handle;
--- linux/drivers/old/libata-scsi.c	2007-04-17 22:11:12.000000000 -0400
+++ linux/drivers/ata/libata-scsi.c	2007-04-18 10:27:29.000000000 -0400
@@ -2749,18 +2749,20 @@
 			return atapi_xlat;
 
 	switch (cmd) {
-	case READ_6:
-	case READ_10:
-	case READ_16:
-
 	case WRITE_6:
 	case WRITE_10:
 	case WRITE_16:
+		dev->needs_flush = 1;
+	case READ_6:
+	case READ_10:
+	case READ_16:
 		return ata_scsi_rw_xlat;
 
 	case SYNCHRONIZE_CACHE:
-		if (ata_try_flush_cache(dev))
+		if (dev->needs_flush && ata_try_flush_cache(dev)) {
 			return ata_scsi_flush_xlat;
+			dev->needs_flush = 0;
+		}
 		break;
 
 	case VERIFY:

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 13:03                       ` Alan Cox
  2007-04-18 13:05                         ` Tejun Heo
@ 2007-04-18 13:39                         ` Stephen Clark
  2007-04-19  7:18                           ` Jan Engelhardt
  2007-04-18 14:32                         ` Mark Lord
  2 siblings, 1 reply; 65+ messages in thread
From: Stephen Clark @ 2007-04-18 13:39 UTC (permalink / raw)
  To: Alan Cox
  Cc: Tejun Heo, 7eggert, Chuck Ebbert, emisca, Jan Engelhardt,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

Alan Cox wrote:

>>Thought about that and querying power state before doing shutdown 
>>sequence but things get somewhat ugly because shutdown sequence is 
>>driven from sd->shutdown().  We'll have to snoop both sync and shutdown 
>>commands and check whether the system is shutting down.  Also, I felt 
>>very uneasy about faking successful completion to SYNCHRONIZE_CACHE.
>>    
>>
>
>If you see a synchronize cache succeed and you then see the drive
>shutdown succeed then you know that a sync cache can be faked as ok
>safely. Any other command in between or after and it doesn't get faked
>
>This seems pretty easy to deal with at command issue.
>
>  
>
>>I dunno.  It's already too late for 2.6.21.  I was hoping we could get 
>>distros to update shutdown utilities in not-too-distant future but I 
>>have no experience with that.  Is that just a wishful thinking?
>>    
>>
>
>Probably not, but it will take a year or so and throughout this time
>period everyone with the wrong combination of shutdown and kernel (which
>will be a lot of people who compile their own kernels) are going to have
>problems caused by what is a very obscure piece of libata internal
>behaviour they'll never even know about.
>
>  
>
So this is the pop I hear on my new laptop that is using 
libata=combined_mode
 when I shut my system down. I didn't get the pop with the same disk 
drive in an older
 laptop that was only ide. It sounds like a relay closing or opening, 
but is really my
drive head doing an emergency retract/park?

>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/
>
>  
>


-- 

"They that give up essential liberty to obtain temporary safety, 
deserve neither liberty nor safety."  (Ben Franklin)

"The course of history shows that as a government grows, liberty 
decreases."  (Thomas Jefferson)




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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 13:03                       ` Alan Cox
@ 2007-04-18 13:05                         ` Tejun Heo
  2007-04-18 13:39                         ` Stephen Clark
  2007-04-18 14:32                         ` Mark Lord
  2 siblings, 0 replies; 65+ messages in thread
From: Tejun Heo @ 2007-04-18 13:05 UTC (permalink / raw)
  To: Alan Cox
  Cc: 7eggert, Chuck Ebbert, emisca, Jan Engelhardt,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

Alan Cox wrote:
>> Thought about that and querying power state before doing shutdown 
>> sequence but things get somewhat ugly because shutdown sequence is 
>> driven from sd->shutdown().  We'll have to snoop both sync and shutdown 
>> commands and check whether the system is shutting down.  Also, I felt 
>> very uneasy about faking successful completion to SYNCHRONIZE_CACHE.
> 
> If you see a synchronize cache succeed and you then see the drive
> shutdown succeed then you know that a sync cache can be faked as ok
> safely. Any other command in between or after and it doesn't get faked
> 
> This seems pretty easy to deal with at command issue.

Yeah, right.  I guess I'm too anal about SYNCHRONIZE_CACHE.

>> I dunno.  It's already too late for 2.6.21.  I was hoping we could get 
>> distros to update shutdown utilities in not-too-distant future but I 
>> have no experience with that.  Is that just a wishful thinking?
> 
> Probably not, but it will take a year or so and throughout this time
> period everyone with the wrong combination of shutdown and kernel (which
> will be a lot of people who compile their own kernels) are going to have
> problems caused by what is a very obscure piece of libata internal
> behaviour they'll never even know about.

Okay, will do another round of the patch.

Thanks.

-- 
tejun

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 12:46                     ` Tejun Heo
  2007-04-18 12:50                       ` Tejun Heo
@ 2007-04-18 13:03                       ` Alan Cox
  2007-04-18 13:05                         ` Tejun Heo
                                           ` (2 more replies)
  1 sibling, 3 replies; 65+ messages in thread
From: Alan Cox @ 2007-04-18 13:03 UTC (permalink / raw)
  To: Tejun Heo
  Cc: 7eggert, Chuck Ebbert, emisca, Jan Engelhardt,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

> Thought about that and querying power state before doing shutdown 
> sequence but things get somewhat ugly because shutdown sequence is 
> driven from sd->shutdown().  We'll have to snoop both sync and shutdown 
> commands and check whether the system is shutting down.  Also, I felt 
> very uneasy about faking successful completion to SYNCHRONIZE_CACHE.

If you see a synchronize cache succeed and you then see the drive
shutdown succeed then you know that a sync cache can be faked as ok
safely. Any other command in between or after and it doesn't get faked

This seems pretty easy to deal with at command issue.

> I dunno.  It's already too late for 2.6.21.  I was hoping we could get 
> distros to update shutdown utilities in not-too-distant future but I 
> have no experience with that.  Is that just a wishful thinking?

Probably not, but it will take a year or so and throughout this time
period everyone with the wrong combination of shutdown and kernel (which
will be a lot of people who compile their own kernels) are going to have
problems caused by what is a very obscure piece of libata internal
behaviour they'll never even know about.


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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 12:46                     ` Tejun Heo
@ 2007-04-18 12:50                       ` Tejun Heo
  2007-04-18 13:03                       ` Alan Cox
  1 sibling, 0 replies; 65+ messages in thread
From: Tejun Heo @ 2007-04-18 12:50 UTC (permalink / raw)
  To: Alan Cox
  Cc: 7eggert, Chuck Ebbert, emisca, Jan Engelhardt,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

Tejun Heo wrote:
> Alan Cox wrote:
>>> Not that simple.  Most disks don't spin up on SYNCHRONIZE_CACHE if 
>>> its cache is clean.  Sadly some disks actually spin up when it 
>>> receives spin down command while spun down to immediately spin down 
>>> again, so we would be fixing problem for some number of disks while 
>>> breaking others.  :-(
>>
>> Snoop the last command sent to the drive, that tells you if you can skip
>> the cache flush ?
> 
> Thought about that and querying power state before doing shutdown 
> sequence but things get somewhat ugly because shutdown sequence is 
> driven from sd->shutdown().  We'll have to snoop both sync and shutdown 
> commands and check whether the system is shutting down.  Also, I felt 
> very uneasy about faking successful completion to SYNCHRONIZE_CACHE.
> 
> I dunno.  It's already too late for 2.6.21.  I was hoping we could get 
> distros to update shutdown utilities in not-too-distant future but I 
> have no experience with that.  Is that just a wishful thinking?
> 

FWIW, the the following message describes the proposed solution.

http://thread.gmane.org/gmane.linux.scsi/30487/focus=17392

-- 
tejun

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 12:29                   ` Alan Cox
@ 2007-04-18 12:46                     ` Tejun Heo
  2007-04-18 12:50                       ` Tejun Heo
  2007-04-18 13:03                       ` Alan Cox
  0 siblings, 2 replies; 65+ messages in thread
From: Tejun Heo @ 2007-04-18 12:46 UTC (permalink / raw)
  To: Alan Cox
  Cc: 7eggert, Chuck Ebbert, emisca, Jan Engelhardt,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

Alan Cox wrote:
>> Not that simple.  Most disks don't spin up on SYNCHRONIZE_CACHE if its 
>> cache is clean.  Sadly some disks actually spin up when it receives spin 
>> down command while spun down to immediately spin down again, so we would 
>> be fixing problem for some number of disks while breaking others.  :-(
> 
> Snoop the last command sent to the drive, that tells you if you can skip
> the cache flush ?

Thought about that and querying power state before doing shutdown 
sequence but things get somewhat ugly because shutdown sequence is 
driven from sd->shutdown().  We'll have to snoop both sync and shutdown 
commands and check whether the system is shutting down.  Also, I felt 
very uneasy about faking successful completion to SYNCHRONIZE_CACHE.

I dunno.  It's already too late for 2.6.21.  I was hoping we could get 
distros to update shutdown utilities in not-too-distant future but I 
have no experience with that.  Is that just a wishful thinking?

-- 
tejun

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 12:05                 ` Tejun Heo
@ 2007-04-18 12:29                   ` Alan Cox
  2007-04-18 12:46                     ` Tejun Heo
  0 siblings, 1 reply; 65+ messages in thread
From: Alan Cox @ 2007-04-18 12:29 UTC (permalink / raw)
  To: Tejun Heo
  Cc: 7eggert, Chuck Ebbert, emisca, Jan Engelhardt,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

> Not that simple.  Most disks don't spin up on SYNCHRONIZE_CACHE if its 
> cache is clean.  Sadly some disks actually spin up when it receives spin 
> down command while spun down to immediately spin down again, so we would 
> be fixing problem for some number of disks while breaking others.  :-(

Snoop the last command sent to the drive, that tells you if you can skip
the cache flush ?

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-18 11:47               ` Bodo Eggert
@ 2007-04-18 12:05                 ` Tejun Heo
  2007-04-18 12:29                   ` Alan Cox
  0 siblings, 1 reply; 65+ messages in thread
From: Tejun Heo @ 2007-04-18 12:05 UTC (permalink / raw)
  To: 7eggert
  Cc: Chuck Ebbert, emisca, Jan Engelhardt, Bartlomiej Zolnierkiewicz,
	linux-kernel, linux-ide, Adrian Bunk, Andrew Morton

Bodo Eggert wrote:
>> SCSI part of the fix is queued in scsi-misc-2.6 tree and libata-dev part
>> is acked and waiting to be merged, so the fix will be available in
>> 2.6.22.  However, it's disabled by default to remain compatible with the
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> current behavior and requires userland change to fully fix the problem.
>   ^^^^^^^^^^^^^^^^
> It sounds like the Schilling kind of compatibility: "The old burner destroyed
> your disk on buffer underruns, therefore the new thing should do the same
> instead of giving you a perfectly readable data disk."
> 
> Guys, not destroying hardware is _NOT_ bad!

Not that simple.  Most disks don't spin up on SYNCHRONIZE_CACHE if its 
cache is clean.  Sadly some disks actually spin up when it receives spin 
down command while spun down to immediately spin down again, so we would 
be fixing problem for some number of disks while breaking others.  :-(

-- 
tejun

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

* Re: Loud "pop" coming from hard drive on reboot
       [not found]             ` <8bbdm-7iS-27@gated-at.bofh.it>
@ 2007-04-18 11:47               ` Bodo Eggert
  2007-04-18 12:05                 ` Tejun Heo
  0 siblings, 1 reply; 65+ messages in thread
From: Bodo Eggert @ 2007-04-18 11:47 UTC (permalink / raw)
  To: Tejun Heo, Chuck Ebbert, emisca, Jan Engelhardt,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide, Adrian Bunk,
	Andrew Morton

Tejun Heo <htejun@gmail.com> wrote:

> This really isn't a regression.  It's been always like that with libata.
>  libata doesn't make devices go into standby mode and shutdown(8) does
> it for libata.  The problem here is that libata does issue
> SYNCHRONIZE_CACHE on shutdown.  So, the sequence of event is...
> 
> 1. shutdown(8) issues SYNCHRONIZE_CACHE followed by STANDBY_NOW
> 2. kernel shutdown starts
> 3. libata shutdown issues SYNCHRONIZE_CACHE
> 4. power goes off
> 
> Some drives seem to spin up at step #3 even when its cache is clean and
> power goes off right after the disk finishes the command.  So, it's
> really bad when it happens - spin down, spin up followed by immediate
> power off.
> 
> SCSI part of the fix is queued in scsi-misc-2.6 tree and libata-dev part
> is acked and waiting to be merged, so the fix will be available in
> 2.6.22.  However, it's disabled by default to remain compatible with the
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> current behavior and requires userland change to fully fix the problem.
  ^^^^^^^^^^^^^^^^
It sounds like the Schilling kind of compatibility: "The old burner destroyed
your disk on buffer underruns, therefore the new thing should do the same
instead of giving you a perfectly readable data disk."

Guys, not destroying hardware is _NOT_ bad!
-- 
Anger, fear, aggression. The Dark Side of the Force are they.
Once you start down the Dark Path, forever will it dominate your destiny.
        -- Jedi Master Yoda
Friß, Spammer: QuG4KfL@BSc.7eggert.dyndns.org

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-17 22:03           ` Mark Lord
@ 2007-04-18  5:39             ` Tejun Heo
  2007-04-18 21:31               ` Bartlomiej Zolnierkiewicz
  2007-04-18 23:36               ` Mark Lord
  0 siblings, 2 replies; 65+ messages in thread
From: Tejun Heo @ 2007-04-18  5:39 UTC (permalink / raw)
  To: Mark Lord
  Cc: Chuck Ebbert, emisca, Jan Engelhardt, Bartlomiej Zolnierkiewicz,
	linux-kernel, linux-ide, Adrian Bunk, Andrew Morton

Mark Lord wrote:
> Chuck Ebbert wrote:
>> Mark Lord wrote:
>>> I'll patch it locally on my own machines, but what about the tens
>>> of thousands of other Seagate notebook drive owners out there?
>>>
>>
>> This is a problem with Seagate specifically, spinning back up
>> on receipt of some command after spindown?
> 
> No, they just seem to be affected worse by it than some other brands.
> The bug is that libata/SCSI now spin-down the drive before the distro's
> scripts are done with it, so it spins down, and then gets spun up again
> by the distro, and then spun down again by the distro.
> 
> And along the way, one/both of the two causes a full mechanism "park",
> which is hard on things if abused (like this).
> 
> Or at least that's what I recall for it.  Tejun?

This really isn't a regression.  It's been always like that with libata.
 libata doesn't make devices go into standby mode and shutdown(8) does
it for libata.  The problem here is that libata does issue
SYNCHRONIZE_CACHE on shutdown.  So, the sequence of event is...

1. shutdown(8) issues SYNCHRONIZE_CACHE followed by STANDBY_NOW
2. kernel shutdown starts
3. libata shutdown issues SYNCHRONIZE_CACHE
4. power goes off

Some drives seem to spin up at step #3 even when its cache is clean and
power goes off right after the disk finishes the command.  So, it's
really bad when it happens - spin down, spin up followed by immediate
power off.

SCSI part of the fix is queued in scsi-misc-2.6 tree and libata-dev part
is acked and waiting to be merged, so the fix will be available in
2.6.22.  However, it's disabled by default to remain compatible with the
current behavior and requires userland change to fully fix the problem.

-- 
tejun

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-17 21:49         ` Chuck Ebbert
@ 2007-04-17 22:03           ` Mark Lord
  2007-04-18  5:39             ` Tejun Heo
  0 siblings, 1 reply; 65+ messages in thread
From: Mark Lord @ 2007-04-17 22:03 UTC (permalink / raw)
  To: Chuck Ebbert
  Cc: emisca, Jan Engelhardt, Bartlomiej Zolnierkiewicz, linux-kernel,
	linux-ide, Adrian Bunk, Andrew Morton

Chuck Ebbert wrote:
> Mark Lord wrote:
>> I'll patch it locally on my own machines, but what about the tens
>> of thousands of other Seagate notebook drive owners out there?
>>
> 
> This is a problem with Seagate specifically, spinning back up
> on receipt of some command after spindown?

No, they just seem to be affected worse by it than some other brands.
The bug is that libata/SCSI now spin-down the drive before the distro's
scripts are done with it, so it spins down, and then gets spun up again
by the distro, and then spun down again by the distro.

And along the way, one/both of the two causes a full mechanism "park",
which is hard on things if abused (like this).

Or at least that's what I recall for it.  Tejun?

2007/4/11, Chuck Ebbert <cebbert@redhat.com>:
> Jan Engelhardt wrote:
> > On Apr 11 2007 17:07, Chuck Ebbert wrote:
> >> When I reboot my notebook, it powers off and powers back on.
> >> On poweroff a loud snapping noise seems to be coming from the
> >> hard drive. Today I noticed there is no "shutdown: hda" on
> >> the console when I reboot. Whne I do a normal poweroff the
> >> message is displayed and there is no noise. Should the IDE
> >> code be changed so it always shuts down the drive? 

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-17 21:41       ` Mark Lord
@ 2007-04-17 21:49         ` Chuck Ebbert
  2007-04-17 22:03           ` Mark Lord
  0 siblings, 1 reply; 65+ messages in thread
From: Chuck Ebbert @ 2007-04-17 21:49 UTC (permalink / raw)
  To: Mark Lord
  Cc: emisca, Jan Engelhardt, Bartlomiej Zolnierkiewicz, linux-kernel,
	linux-ide, Adrian Bunk, Andrew Morton

Mark Lord wrote:
> 
> I'll patch it locally on my own machines, but what about the tens
> of thousands of other Seagate notebook drive owners out there?
> 

This is a problem with Seagate specifically, spinning back up
on receipt of some command after spindown?


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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-15 16:07     ` emisca
  2007-04-15 19:06       ` auxsvr
@ 2007-04-17 21:41       ` Mark Lord
  2007-04-17 21:49         ` Chuck Ebbert
  1 sibling, 1 reply; 65+ messages in thread
From: Mark Lord @ 2007-04-17 21:41 UTC (permalink / raw)
  To: emisca
  Cc: Chuck Ebbert, Jan Engelhardt, Bartlomiej Zolnierkiewicz,
	linux-kernel, linux-ide, Adrian Bunk, Andrew Morton

emisca wrote:
> I can confirm this, I have a Seagate Momentus 5400.3 sata disk, and it
> spins off, respin up and again off when I halt my notebook.
> I had before this disk an IBM/Hitachi one, and it doesn't have this 
> behaviour.
> 
> Take a look at this bug report:
> https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.17/+bug/67810
> 
> There are some references and some patches against 2.6.20 kernel. This
> bug is confirmed there.

Yup.  Last I heard, Tejun has fixed this, and queued the code
for 2.6.22 via James B.   But this could be considered a rather
nasty regression in 2.6.21, in that it does seem to cause
significant and unnecessary wear and tear on the drive mechanisms.

I'll patch it locally on my own machines, but what about the tens
of thousands of other Seagate notebook drive owners out there?

Cheers


> 
> Bye
> 
> 2007/4/11, Chuck Ebbert <cebbert@redhat.com>:
>> Jan Engelhardt wrote:
>> > On Apr 11 2007 17:07, Chuck Ebbert wrote:
>> >> When I reboot my notebook, it powers off and powers back on.
>> >> On poweroff a loud snapping noise seems to be coming from the
>> >> hard drive. Today I noticed there is no "shutdown: hda" on
>> >> the console when I reboot. Whne I do a normal poweroff the
>> >> message is displayed and there is no noise. Should the IDE
>> >> code be changed so it always shuts down the drive?
>> >
>> > What sort of notebook? What sort of harddisk?
>>
>> Compaq Presario V2000 series, with a new Seagate ST9120821A
>> 120GB 5400RPM drive.
>>
>> > Is it as loud as `hdparm -y /dev/hdX"?
>>
>> That makes no noise at all except normal drive seek noises.
>>
>> > Try `smartctl -d ata -a /dev/hdX | grep -i unload` too.
>>
>> Hmm.
>>
>> Power_Cycle_Count ... 108
>> Power-Off_Retract_Count ... 90
>>
>> I did a normal poweroff and the retract count went to 91.
>> There is an almost-unnoticeable click when I do it that way.

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-16 22:26       ` Chuck Ebbert
  2007-04-17  7:00           ` emisca
  2007-04-17  7:37         ` Fabio Comolli
@ 2007-04-17 20:15         ` Henrique de Moraes Holschuh
  2 siblings, 0 replies; 65+ messages in thread
From: Henrique de Moraes Holschuh @ 2007-04-17 20:15 UTC (permalink / raw)
  To: Chuck Ebbert
  Cc: Jan Engelhardt, Pavel Machek, Bartlomiej Zolnierkiewicz,
	linux-kernel, linux-ide

On Mon, 16 Apr 2007, Chuck Ebbert wrote:
> It looks like there are two problems here:
> 
> (1) Some notebooks power off and back on when restarting.

If it happens just under Linux, this is something that really needs to be
addressed post-haste.  Maybe someone should open a bug in bugzilla to help
track it properly?

If it also happens under Windows, you have been sold defective crap that is
being damaged every time you reboot it, get in touch with the manufacturer
and demand a replacement *new* unit with a firmware fix, or your money back.

> (2) Linux (alone) gives a very muted pop on shutdown. This could

Shutdown as in "machine power off", and HDs are under SCSI control (they
appear as scsi devices to userspace, due to libata for example)? Known
issue, see http://bugzilla.kernel.org/show_bug.cgi?id=7838 (actually, IMHO
this fix should have been fast-tracked into 2.6.21, instead of queued for
2.6.22).

Shutdown as in reboot/restart?  New bug that needs to be stomped as soon as
possible, but make sure it is not (1) above.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-16 22:26       ` Chuck Ebbert
  2007-04-17  7:00           ` emisca
@ 2007-04-17  7:37         ` Fabio Comolli
  2007-04-17 20:15         ` Henrique de Moraes Holschuh
  2 siblings, 0 replies; 65+ messages in thread
From: Fabio Comolli @ 2007-04-17  7:37 UTC (permalink / raw)
  To: Chuck Ebbert
  Cc: Jan Engelhardt, Henrique de Moraes Holschuh, Pavel Machek,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide

Hi.

On 4/17/07, Chuck Ebbert <cebbert@redhat.com> wrote:
<snip>

> (2) Linux (alone) gives a very muted pop on shutdown. This could
>     be from bad interaction with the shutdown command, or some
>     other reason (drive not given enough time to shut down?)
>     The noise is not very loud, maybe the head did not have to
>     move very far?
>

I'm facing this with my HP Pavilion DV4378EA with a PATA disk (Toshiba
I think, but I'm not too sure, will check in the afternoon if needed).
"The Other OS" does not  cause the "pop" at shutdown. Linux does (last
checked: yesterday with 2.6.21-rc7).

I'm happy to test patches.
Regards,
Fabio

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-16 22:26       ` Chuck Ebbert
@ 2007-04-17  7:00           ` emisca
  2007-04-17  7:37         ` Fabio Comolli
  2007-04-17 20:15         ` Henrique de Moraes Holschuh
  2 siblings, 0 replies; 65+ messages in thread
From: emisca @ 2007-04-17  7:00 UTC (permalink / raw)
  Cc: linux-kernel, linux-ide

2007/4/17, Chuck Ebbert <cebbert@redhat.com>:
> Jan Engelhardt wrote:
> > On Apr 15 2007 12:53, Henrique de Moraes Holschuh wrote:
> >> On Sat, 14 Apr 2007, Pavel Machek wrote:
> >>> How common are notebooks that cut power to disks during reboot?
> >> Assuming it also does this when running Windows, I'd report it as a grave
> >> bug to the vendor and demand it to be fixed, or the machine to be exchanged
> >> with another model that doesn't have this defect.
> >
> > Given that it does not happen on Windows (IIRC Chuck's post),
> > then just what is Windows [not] doing that Linux does?
>
> It looks like there are two problems here:
>
> (1) Some notebooks power off and back on when restarting.
>     Both Linux and other OS handle that badly because they
>     assume power is not interrupted on reboot. The noise
>     emitted is relatively loud.
>

I'm affected by this problem, hp nx7400 + Seagate Momentus 5400.3 160gb SATA

When "drive spins down, acpi_power_off is written on the console, the
drive spins up again, and 3-4 seconds later the notebook is powered
off, leaving disk heads not parked I think.

I've not tried any new kernel or patches. I'm using stock debian Etch
kernel 2.6.18-5-686.

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

* Re: Loud "pop" coming from hard drive on reboot
@ 2007-04-17  7:00           ` emisca
  0 siblings, 0 replies; 65+ messages in thread
From: emisca @ 2007-04-17  7:00 UTC (permalink / raw)
  Cc: linux-kernel, linux-ide

2007/4/17, Chuck Ebbert <cebbert@redhat.com>:
> Jan Engelhardt wrote:
> > On Apr 15 2007 12:53, Henrique de Moraes Holschuh wrote:
> >> On Sat, 14 Apr 2007, Pavel Machek wrote:
> >>> How common are notebooks that cut power to disks during reboot?
> >> Assuming it also does this when running Windows, I'd report it as a grave
> >> bug to the vendor and demand it to be fixed, or the machine to be exchanged
> >> with another model that doesn't have this defect.
> >
> > Given that it does not happen on Windows (IIRC Chuck's post),
> > then just what is Windows [not] doing that Linux does?
>
> It looks like there are two problems here:
>
> (1) Some notebooks power off and back on when restarting.
>     Both Linux and other OS handle that badly because they
>     assume power is not interrupted on reboot. The noise
>     emitted is relatively loud.
>

I'm affected by this problem, hp nx7400 + Seagate Momentus 5400.3 160gb SATA

When "drive spins down, acpi_power_off is written on the console, the
drive spins up again, and 3-4 seconds later the notebook is powered
off, leaving disk heads not parked I think.

I've not tried any new kernel or patches. I'm using stock debian Etch
kernel 2.6.18-5-686.

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-15 18:50     ` Jan Engelhardt
@ 2007-04-16 22:26       ` Chuck Ebbert
  2007-04-17  7:00           ` emisca
                           ` (2 more replies)
  0 siblings, 3 replies; 65+ messages in thread
From: Chuck Ebbert @ 2007-04-16 22:26 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Henrique de Moraes Holschuh, Pavel Machek,
	Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide

Jan Engelhardt wrote:
> On Apr 15 2007 12:53, Henrique de Moraes Holschuh wrote:
>> On Sat, 14 Apr 2007, Pavel Machek wrote:
>>> How common are notebooks that cut power to disks during reboot?
>> Assuming it also does this when running Windows, I'd report it as a grave
>> bug to the vendor and demand it to be fixed, or the machine to be exchanged
>> with another model that doesn't have this defect.
> 
> Given that it does not happen on Windows (IIRC Chuck's post),
> then just what is Windows [not] doing that Linux does?

It looks like there are two problems here:

(1) Some notebooks power off and back on when restarting.
    Both Linux and other OS handle that badly because they
    assume power is not interrupted on reboot. The noise
    emitted is relatively loud.

(2) Linux (alone) gives a very muted pop on shutdown. This could
    be from bad interaction with the shutdown command, or some
    other reason (drive not given enough time to shut down?)
    The noise is not very loud, maybe the head did not have to
    move very far?


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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-15 16:07     ` emisca
@ 2007-04-15 19:06       ` auxsvr
  2007-04-17 21:41       ` Mark Lord
  1 sibling, 0 replies; 65+ messages in thread
From: auxsvr @ 2007-04-15 19:06 UTC (permalink / raw)
  To: linux-kernel

On Sunday 15 April 2007 19:07, emisca wrote:
> I can confirm this, I have a Seagate Momentus 5400.3 sata disk, and it
> spins off, respin up and again off when I halt my notebook.
> I had before this disk an IBM/Hitachi one, and it doesn't have this
> behaviour.
>
> Take a look at this bug report:
> https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.17/+bug/67810
>
> There are some references and some patches against 2.6.20 kernel. This
> bug is confirmed there.
>
> Bye
>

I had the same problem with 2 WD disks on a desktop machine for 2 years, until 
I activated ACPI S3 (suspend to RAM) in the BIOS. According to this bug 
report (https://bugzilla.novell.com/show_bug.cgi?id=229210) the problem may 
be due to bad interaction between libata and the shutdown command. Tejun Heo, 
whom I thank for his support, has already proposed a patch to fix this. From 
the description there, it looks like it may also fix the reboot problem this 
thread is about.

Regards

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-15 15:53   ` Henrique de Moraes Holschuh
@ 2007-04-15 18:50     ` Jan Engelhardt
  2007-04-16 22:26       ` Chuck Ebbert
  0 siblings, 1 reply; 65+ messages in thread
From: Jan Engelhardt @ 2007-04-15 18:50 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh
  Cc: Pavel Machek, Chuck Ebbert, Bartlomiej Zolnierkiewicz,
	linux-kernel, linux-ide


On Apr 15 2007 12:53, Henrique de Moraes Holschuh wrote:
>On Sat, 14 Apr 2007, Pavel Machek wrote:
>> How common are notebooks that cut power to disks during reboot?
>
>Assuming it also does this when running Windows, I'd report it as a grave
>bug to the vendor and demand it to be fixed, or the machine to be exchanged
>with another model that doesn't have this defect.

Given that it does not happen on Windows (IIRC Chuck's post),
then just what is Windows [not] doing that Linux does?


Jan
-- 

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-11 21:35   ` Chuck Ebbert
  2007-04-11 21:49     ` Jan Engelhardt
@ 2007-04-15 16:07     ` emisca
  2007-04-15 19:06       ` auxsvr
  2007-04-17 21:41       ` Mark Lord
  1 sibling, 2 replies; 65+ messages in thread
From: emisca @ 2007-04-15 16:07 UTC (permalink / raw)
  To: Chuck Ebbert
  Cc: Jan Engelhardt, Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide

I can confirm this, I have a Seagate Momentus 5400.3 sata disk, and it
spins off, respin up and again off when I halt my notebook.
I had before this disk an IBM/Hitachi one, and it doesn't have this behaviour.

Take a look at this bug report:
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.17/+bug/67810

There are some references and some patches against 2.6.20 kernel. This
bug is confirmed there.

Bye

2007/4/11, Chuck Ebbert <cebbert@redhat.com>:
> Jan Engelhardt wrote:
> > On Apr 11 2007 17:07, Chuck Ebbert wrote:
> >> When I reboot my notebook, it powers off and powers back on.
> >> On poweroff a loud snapping noise seems to be coming from the
> >> hard drive. Today I noticed there is no "shutdown: hda" on
> >> the console when I reboot. Whne I do a normal poweroff the
> >> message is displayed and there is no noise. Should the IDE
> >> code be changed so it always shuts down the drive?
> >
> > What sort of notebook? What sort of harddisk?
>
> Compaq Presario V2000 series, with a new Seagate ST9120821A
> 120GB 5400RPM drive.
>
> > Is it as loud as `hdparm -y /dev/hdX"?
>
> That makes no noise at all except normal drive seek noises.
>
> > Try `smartctl -d ata -a /dev/hdX | grep -i unload` too.
>
> Hmm.
>
> Power_Cycle_Count ... 108
> Power-Off_Retract_Count ... 90
>
> I did a normal poweroff and the retract count went to 91.
> There is an almost-unnoticeable click when I do it that way.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-14 10:52 ` Pavel Machek
@ 2007-04-15 15:53   ` Henrique de Moraes Holschuh
  2007-04-15 18:50     ` Jan Engelhardt
  0 siblings, 1 reply; 65+ messages in thread
From: Henrique de Moraes Holschuh @ 2007-04-15 15:53 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Chuck Ebbert, Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide

On Sat, 14 Apr 2007, Pavel Machek wrote:
> How common are notebooks that cut power to disks during reboot?

Not common at all.  Given that it wears the electronics a lot, it must be
either a defect (of the kinds Brazilian law forces the manufacturer to
either fix or give you your money back).

Assuming it also does this when running Windows, I'd report it as a grave
bug to the vendor and demand it to be fixed, or the machine to be exchanged
with another model that doesn't have this defect.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-11 21:07 Chuck Ebbert
  2007-04-11 21:16 ` Jan Engelhardt
@ 2007-04-14 10:52 ` Pavel Machek
  2007-04-15 15:53   ` Henrique de Moraes Holschuh
  1 sibling, 1 reply; 65+ messages in thread
From: Pavel Machek @ 2007-04-14 10:52 UTC (permalink / raw)
  To: Chuck Ebbert; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide


Hi!

> When I reboot my notebook, it powers off and powers back on.
> On poweroff a loud snapping noise seems to be coming from the
> hard drive. Today I noticed there is no "shutdown: hda" on
> the console when I reboot. Whne I do a normal poweroff the
> message is displayed and there is no noise. Should the IDE
> code be changed so it always shuts down the drive?

Well... most machines have reboot handling where they do not cut power
to disk drive. That means that shutting down their hdds would
unneccessarily wear their drives.

...while we unneccessarily wear *your* drive :-(.

How common are notebooks that cut power to disks during reboot?
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: Loud "pop" coming from hard drive on reboot
       [not found] <fa.nTNVZ3bPe8773+gVV7CvcwBT5zY@ifi.uio.no>
@ 2007-04-13 23:21 ` Robert Hancock
       [not found] ` <fa.r8VLu18GDND9EByYV/EX2mH9V88@ifi.uio.no>
  1 sibling, 0 replies; 65+ messages in thread
From: Robert Hancock @ 2007-04-13 23:21 UTC (permalink / raw)
  To: Chuck Ebbert, linux-kernel; +Cc: Bartlomiej Zolnierkiewicz

Chuck Ebbert wrote:
> When I reboot my notebook, it powers off and powers back on.
> On poweroff a loud snapping noise seems to be coming from the
> hard drive. Today I noticed there is no "shutdown: hda" on
> the console when I reboot. Whne I do a normal poweroff the
> message is displayed and there is no noise. Should the IDE
> code be changed so it always shuts down the drive?

The question is why the laptop powers off and back on. Do reboots from 
Windows do that? That is why the drive makes so much noise, because the 
kernel didn't standby the drive before rebooting, since it shouldn't 
have to, and yet the drive loses power so it does an emergency retract.

Making the kernel shutdown on reboot would only add more spindown/up 
cycles for normally working systems.

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-13 20:47             ` Bartlomiej Zolnierkiewicz
@ 2007-04-13 21:13               ` Chuck Ebbert
  0 siblings, 0 replies; 65+ messages in thread
From: Chuck Ebbert @ 2007-04-13 21:13 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: Jan Engelhardt, linux-kernel, linux-ide

Bartlomiej Zolnierkiewicz wrote:
>>
>> There is no noise and the retract count does not increase when I boot
>> and then shutdown/power off the other OS.
> 
> What about shutdown/reboot?

Very loud noise and the count goes up.

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-13 19:36           ` Chuck Ebbert
@ 2007-04-13 20:47             ` Bartlomiej Zolnierkiewicz
  2007-04-13 21:13               ` Chuck Ebbert
  0 siblings, 1 reply; 65+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-04-13 20:47 UTC (permalink / raw)
  To: Chuck Ebbert; +Cc: Jan Engelhardt, linux-kernel, linux-ide

On 4/13/07, Chuck Ebbert <cebbert@redhat.com> wrote:
> Bartlomiej Zolnierkiewicz wrote:
> >> Now we're getting somewhere. There is some other OS on here because
> >> it's required for doing BIOS updates. I booted it and shut down.
> >> The power cycle count increased but the power off retract count did not.
> >>
> >> The counts are:
> >>
> >> power cycle ... 111
> >> power off retract ... 92
> >>
> >> The difference is now 19; it was 18 before.
> >
> > Is the noise present if you reboot the other OS?
> > Does it result in Power-Off_Retract count increase?
>
> There is no noise and the retract count does not increase when I boot
> and then shutdown/power off the other OS.

What about shutdown/reboot?

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-11 22:07       ` Chuck Ebbert
@ 2007-04-13 19:42         ` Bartlomiej Zolnierkiewicz
  2007-04-13 19:36           ` Chuck Ebbert
  0 siblings, 1 reply; 65+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-04-13 19:42 UTC (permalink / raw)
  To: Chuck Ebbert; +Cc: Jan Engelhardt, linux-kernel, linux-ide

On Thursday 12 April 2007, Chuck Ebbert wrote:
> Jan Engelhardt wrote:
> > On Apr 11 2007 17:35, Chuck Ebbert wrote:
> >> Jan Engelhardt wrote:
> >>> On Apr 11 2007 17:07, Chuck Ebbert wrote:
> >>>> When I reboot my notebook, it powers off and powers back on.
> >>>> On poweroff a loud snapping noise seems to be coming from the
> >>>> hard drive. Today I noticed there is no "shutdown: hda" on
> >>>> the console when I reboot. Whne I do a normal poweroff the
> >>>> message is displayed and there is no noise. Should the IDE
> >>>> code be changed so it always shuts down the drive?
> >>> What sort of notebook? What sort of harddisk?
> >> Compaq Presario V2000 series, with a new Seagate ST9120821A
> >> 120GB 5400RPM drive.
> > 
> > I specifically hoped you might have a TOSHIBA MK2003GAH,
> > which does a hard unload when left idle for too long.
> > 
> > Only on reboots huh?
> > 
> > What happens if you reboot another OS, freebsd f.ex.? (You can try that off
> > CD1)
> 
> Now we're getting somewhere. There is some other OS on here because
> it's required for doing BIOS updates. I booted it and shut down.
> The power cycle count increased but the power off retract count did not.
> 
> The counts are:
> 
> power cycle ... 111
> power off retract ... 92
> 
> The difference is now 19; it was 18 before.

Is the noise present if you reboot the other OS?
Does it result in Power-Off_Retract count increase?

Bart

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-13 19:42         ` Bartlomiej Zolnierkiewicz
@ 2007-04-13 19:36           ` Chuck Ebbert
  2007-04-13 20:47             ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 65+ messages in thread
From: Chuck Ebbert @ 2007-04-13 19:36 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: Jan Engelhardt, linux-kernel, linux-ide

Bartlomiej Zolnierkiewicz wrote:
>> Now we're getting somewhere. There is some other OS on here because
>> it's required for doing BIOS updates. I booted it and shut down.
>> The power cycle count increased but the power off retract count did not.
>>
>> The counts are:
>>
>> power cycle ... 111
>> power off retract ... 92
>>
>> The difference is now 19; it was 18 before.
> 
> Is the noise present if you reboot the other OS?
> Does it result in Power-Off_Retract count increase?

There is no noise and the retract count does not increase when I boot
and then shutdown/power off the other OS.


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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-11 21:49     ` Jan Engelhardt
@ 2007-04-11 22:07       ` Chuck Ebbert
  2007-04-13 19:42         ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 65+ messages in thread
From: Chuck Ebbert @ 2007-04-11 22:07 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide

Jan Engelhardt wrote:
> On Apr 11 2007 17:35, Chuck Ebbert wrote:
>> Jan Engelhardt wrote:
>>> On Apr 11 2007 17:07, Chuck Ebbert wrote:
>>>> When I reboot my notebook, it powers off and powers back on.
>>>> On poweroff a loud snapping noise seems to be coming from the
>>>> hard drive. Today I noticed there is no "shutdown: hda" on
>>>> the console when I reboot. Whne I do a normal poweroff the
>>>> message is displayed and there is no noise. Should the IDE
>>>> code be changed so it always shuts down the drive?
>>> What sort of notebook? What sort of harddisk?
>> Compaq Presario V2000 series, with a new Seagate ST9120821A
>> 120GB 5400RPM drive.
> 
> I specifically hoped you might have a TOSHIBA MK2003GAH,
> which does a hard unload when left idle for too long.
> 
> Only on reboots huh?
> 
> What happens if you reboot another OS, freebsd f.ex.? (You can try that off
> CD1)

Now we're getting somewhere. There is some other OS on here because
it's required for doing BIOS updates. I booted it and shut down.
The power cycle count increased but the power off retract count did not.

The counts are:

power cycle ... 111
power off retract ... 92

The difference is now 19; it was 18 before.



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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-11 21:35   ` Chuck Ebbert
@ 2007-04-11 21:49     ` Jan Engelhardt
  2007-04-11 22:07       ` Chuck Ebbert
  2007-04-15 16:07     ` emisca
  1 sibling, 1 reply; 65+ messages in thread
From: Jan Engelhardt @ 2007-04-11 21:49 UTC (permalink / raw)
  To: Chuck Ebbert; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide


On Apr 11 2007 17:35, Chuck Ebbert wrote:
>Jan Engelhardt wrote:
>> On Apr 11 2007 17:07, Chuck Ebbert wrote:
>>> When I reboot my notebook, it powers off and powers back on.
>>> On poweroff a loud snapping noise seems to be coming from the
>>> hard drive. Today I noticed there is no "shutdown: hda" on
>>> the console when I reboot. Whne I do a normal poweroff the
>>> message is displayed and there is no noise. Should the IDE
>>> code be changed so it always shuts down the drive?
>> 
>> What sort of notebook? What sort of harddisk?
>
>Compaq Presario V2000 series, with a new Seagate ST9120821A
>120GB 5400RPM drive.

I specifically hoped you might have a TOSHIBA MK2003GAH,
which does a hard unload when left idle for too long.

Only on reboots huh?

What happens if you reboot another OS, freebsd f.ex.? (You can try that off
CD1)

Jan
-- 

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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-11 21:16 ` Jan Engelhardt
@ 2007-04-11 21:35   ` Chuck Ebbert
  2007-04-11 21:49     ` Jan Engelhardt
  2007-04-15 16:07     ` emisca
  0 siblings, 2 replies; 65+ messages in thread
From: Chuck Ebbert @ 2007-04-11 21:35 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide

Jan Engelhardt wrote:
> On Apr 11 2007 17:07, Chuck Ebbert wrote:
>> When I reboot my notebook, it powers off and powers back on.
>> On poweroff a loud snapping noise seems to be coming from the
>> hard drive. Today I noticed there is no "shutdown: hda" on
>> the console when I reboot. Whne I do a normal poweroff the
>> message is displayed and there is no noise. Should the IDE
>> code be changed so it always shuts down the drive?
> 
> What sort of notebook? What sort of harddisk?

Compaq Presario V2000 series, with a new Seagate ST9120821A
120GB 5400RPM drive.

> Is it as loud as `hdparm -y /dev/hdX"?

That makes no noise at all except normal drive seek noises.

> Try `smartctl -d ata -a /dev/hdX | grep -i unload` too.

Hmm.

Power_Cycle_Count ... 108
Power-Off_Retract_Count ... 90

I did a normal poweroff and the retract count went to 91.
There is an almost-unnoticeable click when I do it that way.


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

* Re: Loud "pop" coming from hard drive on reboot
  2007-04-11 21:07 Chuck Ebbert
@ 2007-04-11 21:16 ` Jan Engelhardt
  2007-04-11 21:35   ` Chuck Ebbert
  2007-04-14 10:52 ` Pavel Machek
  1 sibling, 1 reply; 65+ messages in thread
From: Jan Engelhardt @ 2007-04-11 21:16 UTC (permalink / raw)
  To: Chuck Ebbert; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel, linux-ide


On Apr 11 2007 17:07, Chuck Ebbert wrote:
>
>When I reboot my notebook, it powers off and powers back on.
>On poweroff a loud snapping noise seems to be coming from the
>hard drive. Today I noticed there is no "shutdown: hda" on
>the console when I reboot. Whne I do a normal poweroff the
>message is displayed and there is no noise. Should the IDE
>code be changed so it always shuts down the drive?

What sort of notebook? What sort of harddisk?
Is it as loud as `hdparm -y /dev/hdX"?
Try `smartctl -d ata -a /dev/hdX | grep -i unload` too.


Jan
-- 

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

* Loud "pop" coming from hard drive on reboot
@ 2007-04-11 21:07 Chuck Ebbert
  2007-04-11 21:16 ` Jan Engelhardt
  2007-04-14 10:52 ` Pavel Machek
  0 siblings, 2 replies; 65+ messages in thread
From: Chuck Ebbert @ 2007-04-11 21:07 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel, linux-ide

When I reboot my notebook, it powers off and powers back on.
On poweroff a loud snapping noise seems to be coming from the
hard drive. Today I noticed there is no "shutdown: hda" on
the console when I reboot. Whne I do a normal poweroff the
message is displayed and there is no noise. Should the IDE
code be changed so it always shuts down the drive?

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

end of thread, other threads:[~2007-04-23 23:30 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <fa.XZdGeaFaW9WSFIAsz5f9RETfH0c@ifi.uio.no>
     [not found] ` <fa.8Q2FxIVtQ1sfsfDBeXACAS7rK6Y@ifi.uio.no>
2007-04-18 22:57   ` Loud "pop" coming from hard drive on reboot Robert Hancock
     [not found] <fa.C4axrtm0R4NUqTWfuNUHmUuWy3s@ifi.uio.no>
     [not found] ` <fa.VWJWPLq+/tQvH9AK4UjcjZqbJe4@ifi.uio.no>
     [not found]   ` <fa.EnoRw2EXyWNvVcFxHrcbfZBCcsg@ifi.uio.no>
     [not found]     ` <fa.M3hXdZRYWoxu+2mG+LfZsZs6AKA@ifi.uio.no>
     [not found]       ` <fa.9O8bUjY5F4TzNzCQp6dHXDtOIR0@ifi.uio.no>
     [not found]         ` <fa.kwrK207qOU0rARQuJJKqsJ7Nk4w@ifi.uio.no>
2007-04-18 22:58           ` Robert Hancock
     [not found] <88SeR-5Sf-15@gated-at.bofh.it>
     [not found] ` <88Sov-662-3@gated-at.bofh.it>
     [not found]   ` <88SHV-6uL-29@gated-at.bofh.it>
     [not found]     ` <8agVk-3wc-81@gated-at.bofh.it>
     [not found]       ` <8b3IR-4mE-25@gated-at.bofh.it>
     [not found]         ` <8b3SA-4z3-5@gated-at.bofh.it>
     [not found]           ` <8b42g-51N-15@gated-at.bofh.it>
     [not found]             ` <8bbdm-7iS-27@gated-at.bofh.it>
2007-04-18 11:47               ` Bodo Eggert
2007-04-18 12:05                 ` Tejun Heo
2007-04-18 12:29                   ` Alan Cox
2007-04-18 12:46                     ` Tejun Heo
2007-04-18 12:50                       ` Tejun Heo
2007-04-18 13:03                       ` Alan Cox
2007-04-18 13:05                         ` Tejun Heo
2007-04-18 13:39                         ` Stephen Clark
2007-04-19  7:18                           ` Jan Engelhardt
2007-04-19 12:59                             ` Stephen Clark
2007-04-19 13:32                               ` Mark Lord
2007-04-18 14:32                         ` Mark Lord
2007-04-18 14:35                           ` Mark Lord
2007-04-18 15:06                           ` Alan Cox
2007-04-18 15:16                             ` Mark Lord
2007-04-18 15:25                               ` Tejun Heo
2007-04-18 17:08                                 ` Mark Lord
2007-04-18 17:19                                   ` Mark Lord
2007-04-18 17:46                                     ` Chuck Ebbert
2007-04-18 21:22                                       ` Bartlomiej Zolnierkiewicz
2007-04-18 21:27                                         ` Chuck Ebbert
2007-04-21 23:20                                           ` Peter Zijlstra
2007-04-23 23:27                                             ` Chuck Ebbert
2007-04-18 21:29                                         ` Greg Freemyer
2007-04-18 17:46                                     ` Stephen Clark
2007-04-19 17:50                                       ` Chuck Ebbert
2007-04-20 12:15                                         ` Stephen Clark
2007-04-20 19:57                                         ` Fabio Comolli
2007-04-21  9:45                                           ` emisca
2007-04-21  9:50                                             ` Fabio Comolli
2007-04-21 14:33                                           ` Jan Engelhardt
2007-04-21 15:11                                             ` Fabio Comolli
2007-04-18 17:04                               ` Stephen Clark
     [not found] <fa.nTNVZ3bPe8773+gVV7CvcwBT5zY@ifi.uio.no>
2007-04-13 23:21 ` Robert Hancock
     [not found] ` <fa.r8VLu18GDND9EByYV/EX2mH9V88@ifi.uio.no>
     [not found]   ` <fa.30Zxf5IYhdVc+I5v0caKmHH3HmE@ifi.uio.no>
     [not found]     ` <fa.EFm9zBLufsOlxdviaZmnBDcbYgY@ifi.uio.no>
     [not found]       ` <fa.TBFIUvjBaGbwUHy5JUiGJpvOeMI@ifi.uio.no>
     [not found]         ` <fa.jDn5j5GVDwXXnVYH74vVT3m+Gq8@ifi.uio.no>
2007-04-18 23:00           ` Robert Hancock
2007-04-18 23:25             ` Chuck Ebbert
2007-04-19 13:30               ` emisca
2007-04-11 21:07 Chuck Ebbert
2007-04-11 21:16 ` Jan Engelhardt
2007-04-11 21:35   ` Chuck Ebbert
2007-04-11 21:49     ` Jan Engelhardt
2007-04-11 22:07       ` Chuck Ebbert
2007-04-13 19:42         ` Bartlomiej Zolnierkiewicz
2007-04-13 19:36           ` Chuck Ebbert
2007-04-13 20:47             ` Bartlomiej Zolnierkiewicz
2007-04-13 21:13               ` Chuck Ebbert
2007-04-15 16:07     ` emisca
2007-04-15 19:06       ` auxsvr
2007-04-17 21:41       ` Mark Lord
2007-04-17 21:49         ` Chuck Ebbert
2007-04-17 22:03           ` Mark Lord
2007-04-18  5:39             ` Tejun Heo
2007-04-18 21:31               ` Bartlomiej Zolnierkiewicz
2007-04-18 23:36               ` Mark Lord
2007-04-18 23:51                 ` Mark Lord
2007-04-14 10:52 ` Pavel Machek
2007-04-15 15:53   ` Henrique de Moraes Holschuh
2007-04-15 18:50     ` Jan Engelhardt
2007-04-16 22:26       ` Chuck Ebbert
2007-04-17  7:00         ` emisca
2007-04-17  7:00           ` emisca
2007-04-17  7:37         ` Fabio Comolli
2007-04-17 20:15         ` Henrique de Moraes Holschuh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.