Re: Loud "pop" coming from hard drive on reboot

2007-04-23 Thread Chuck Ebbert
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...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-23 Thread Chuck Ebbert
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...
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-21 Thread Peter Zijlstra
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.

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


Re: Loud "pop" coming from hard drive on reboot

2007-04-21 Thread Fabio Comolli

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 <[EMAIL PROTECTED]> 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
--


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


Re: Loud "pop" coming from hard drive on reboot

2007-04-21 Thread Jan Engelhardt

>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
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-21 Thread Fabio Comolli

Hi.

On 4/21/07, emisca <[EMAIL PROTECTED]> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-21 Thread emisca

So, removing -d halt option solves this problem?

2007/4/20, Fabio Comolli <[EMAIL PROTECTED]>:

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 <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>


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


Re: Loud pop coming from hard drive on reboot

2007-04-21 Thread emisca

So, removing -d halt option solves this problem?

2007/4/20, Fabio Comolli [EMAIL PROTECTED]:

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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/



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


Re: Loud pop coming from hard drive on reboot

2007-04-21 Thread Fabio Comolli

Hi.

On 4/21/07, emisca [EMAIL PROTECTED] 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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-21 Thread Jan Engelhardt

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
-- 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-21 Thread Fabio Comolli

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 [EMAIL PROTECTED] 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
--


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


Re: Loud pop coming from hard drive on reboot

2007-04-21 Thread Peter Zijlstra
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.

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


Re: Loud "pop" coming from hard drive on reboot

2007-04-20 Thread Fabio Comolli

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 <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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


Re: Loud "pop" coming from hard drive on reboot

2007-04-20 Thread Stephen Clark

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)




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


Re: Loud pop coming from hard drive on reboot

2007-04-20 Thread Stephen Clark

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)




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


Re: Loud pop coming from hard drive on reboot

2007-04-20 Thread Fabio Comolli

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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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


Re: Loud "pop" coming from hard drive on reboot

2007-04-19 Thread Chuck Ebbert
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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-19 Thread Mark Lord

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?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-19 Thread emisca

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 <[EMAIL PROTECTED]>:

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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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


Re: Loud "pop" coming from hard drive on reboot

2007-04-19 Thread Stephen Clark

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)




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


Re: Loud "pop" coming from hard drive on reboot

2007-04-19 Thread Jan Engelhardt

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
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-19 Thread Jan Engelhardt

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
-- 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-19 Thread Stephen Clark

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)




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


Re: Loud pop coming from hard drive on reboot

2007-04-19 Thread emisca

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 [EMAIL PROTECTED]:

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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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


Re: Loud pop coming from hard drive on reboot

2007-04-19 Thread Mark Lord

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?
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-19 Thread Chuck Ebbert
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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Mark Lord

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Mark Lord

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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Chuck Ebbert
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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Robert Hancock

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 [EMAIL PROTECTED]
Home Page: http://www.roberthancock.com/

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


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Robert Hancock

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 [EMAIL PROTECTED]
Home Page: http://www.roberthancock.com/

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


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Robert Hancock

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 [EMAIL PROTECTED]
Home Page: http://www.roberthancock.com/

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


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Greg Freemyer

On 4/18/07, Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Chuck Ebbert
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?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Bartlomiej Zolnierkiewicz

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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Bartlomiej Zolnierkiewicz

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Chuck Ebbert
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...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Stephen Clark

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 [EMAIL PROTECTED]
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)




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


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Mark Lord

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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Mark Lord

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_Count0x0032   099   099   020Old_age   Always   
-   1711
+  4 Start_Stop_Count0x0032   099   099   020Old_age   Always   
-   1712
..
- 12 Power_Cycle_Count   0x0032   099   099   020Old_age   Always   
-   1051
+ 12 Power_Cycle_Count   0x0032   099   099   020Old_age   Always   
-   1053
..
-192 Power-Off_Retract_Count 0x0032   100   100   000Old_age   Always   
-   126
-193 Load_Cycle_Count0x0032   015   015   000Old_age   Always   
-   170404
+192 Power-Off_Retract_Count 0x0032   100   100   000Old_age   Always   
-   128
+193 Load_Cycle_Count0x0032   015   015   000Old_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

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


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Stephen Clark

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 <[EMAIL PROTECTED]>
---
--- old/include/linux/libata.h  2007-04-18 10:30:25.0 -0400
+++ linux/include/linux/libata.h2007-04-18 10:30:28.0 -0400
@@ -499,6 +499,7 @@
struct ata_eringering;
int spdn_cnt;
unsigned inthorkage;/* 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.0 -0400
+++ linux/drivers/ata/libata-scsi.c 2007-04-18 10:51:09.0 -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 [EMAIL PROTECTED]
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)




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


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Tejun Heo
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Mark Lord

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 <[EMAIL PROTECTED]>
---
--- old/include/linux/libata.h  2007-04-18 10:30:25.0 -0400
+++ linux/include/linux/libata.h2007-04-18 10:30:28.0 -0400
@@ -499,6 +499,7 @@
struct ata_eringering;
int spdn_cnt;
unsigned inthorkage;/* 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.0 -0400
+++ linux/drivers/ata/libata-scsi.c 2007-04-18 10:51:09.0 -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-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Alan Cox
> + 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Mark Lord

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 <[EMAIL PROTECTED]>
---
--- old/include/linux/libata.h  2007-04-18 10:30:25.0 -0400
+++ linux/include/linux/libata.h2007-04-18 10:30:28.0 -0400
@@ -499,6 +499,7 @@
struct ata_eringering;
int spdn_cnt;
unsigned inthorkage;/* 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.0 -0400
+++ linux/drivers/ata/libata-scsi.c 2007-04-18 10:27:29.0 -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:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Mark Lord

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 <[EMAIL PROTECTED]>
---
--- linux/include/linux/libata.h.orig   2007-04-18 10:30:25.0 -0400
+++ linux/include/linux/libata.h2007-04-18 10:30:28.0 -0400
@@ -499,6 +499,7 @@
struct ata_eringering;
int spdn_cnt;
unsigned inthorkage;/* 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.0 -0400
+++ linux/drivers/ata/libata-scsi.c 2007-04-18 10:27:29.0 -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:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Stephen Clark

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 [EMAIL PROTECTED]
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)




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


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Tejun Heo

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Alan Cox
> 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.

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


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Tejun Heo

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Tejun Heo

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Alan Cox
> 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 ?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Tejun Heo

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-18 Thread Bodo Eggert
Tejun Heo <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Bodo Eggert
Tejun Heo [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Tejun Heo

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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Alan Cox
 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 ?
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Tejun Heo

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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Tejun Heo

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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Alan Cox
 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.

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


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Tejun Heo

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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Stephen Clark

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 [EMAIL PROTECTED]
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)




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


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Mark Lord

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 [EMAIL PROTECTED]
---
--- linux/include/linux/libata.h.orig   2007-04-18 10:30:25.0 -0400
+++ linux/include/linux/libata.h2007-04-18 10:30:28.0 -0400
@@ -499,6 +499,7 @@
struct ata_eringering;
int spdn_cnt;
unsigned inthorkage;/* 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.0 -0400
+++ linux/drivers/ata/libata-scsi.c 2007-04-18 10:27:29.0 -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:
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Mark Lord

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 [EMAIL PROTECTED]
---
--- old/include/linux/libata.h  2007-04-18 10:30:25.0 -0400
+++ linux/include/linux/libata.h2007-04-18 10:30:28.0 -0400
@@ -499,6 +499,7 @@
struct ata_eringering;
int spdn_cnt;
unsigned inthorkage;/* 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.0 -0400
+++ linux/drivers/ata/libata-scsi.c 2007-04-18 10:27:29.0 -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:
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Alan Cox
 + 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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Mark Lord

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 [EMAIL PROTECTED]
---
--- old/include/linux/libata.h  2007-04-18 10:30:25.0 -0400
+++ linux/include/linux/libata.h2007-04-18 10:30:28.0 -0400
@@ -499,6 +499,7 @@
struct ata_eringering;
int spdn_cnt;
unsigned inthorkage;/* 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.0 -0400
+++ linux/drivers/ata/libata-scsi.c 2007-04-18 10:51:09.0 -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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Tejun Heo
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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Stephen Clark

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 [EMAIL PROTECTED]
---
--- old/include/linux/libata.h  2007-04-18 10:30:25.0 -0400
+++ linux/include/linux/libata.h2007-04-18 10:30:28.0 -0400
@@ -499,6 +499,7 @@
struct ata_eringering;
int spdn_cnt;
unsigned inthorkage;/* 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.0 -0400
+++ linux/drivers/ata/libata-scsi.c 2007-04-18 10:51:09.0 -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 [EMAIL PROTECTED]
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)




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


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Mark Lord

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_Count0x0032   099   099   020Old_age   Always   
-   1711
+  4 Start_Stop_Count0x0032   099   099   020Old_age   Always   
-   1712
..
- 12 Power_Cycle_Count   0x0032   099   099   020Old_age   Always   
-   1051
+ 12 Power_Cycle_Count   0x0032   099   099   020Old_age   Always   
-   1053
..
-192 Power-Off_Retract_Count 0x0032   100   100   000Old_age   Always   
-   126
-193 Load_Cycle_Count0x0032   015   015   000Old_age   Always   
-   170404
+192 Power-Off_Retract_Count 0x0032   100   100   000Old_age   Always   
-   128
+193 Load_Cycle_Count0x0032   015   015   000Old_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

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


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Mark Lord

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-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Stephen Clark

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 [EMAIL PROTECTED]
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)




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


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Chuck Ebbert
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...
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Bartlomiej Zolnierkiewicz

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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Bartlomiej Zolnierkiewicz

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.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Greg Freemyer

On 4/18/07, Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] 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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Chuck Ebbert
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?
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Robert Hancock

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 [EMAIL PROTECTED]
Home Page: http://www.roberthancock.com/

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


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Robert Hancock

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 [EMAIL PROTECTED]
Home Page: http://www.roberthancock.com/

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


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Robert Hancock

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 [EMAIL PROTECTED]
Home Page: http://www.roberthancock.com/

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


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Chuck Ebbert
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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Mark Lord

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.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-18 Thread Mark Lord

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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-17 Thread Tejun Heo
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-17 Thread Mark Lord

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 <[EMAIL PROTECTED]>:

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? 

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


Re: Loud "pop" coming from hard drive on reboot

2007-04-17 Thread Chuck Ebbert
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?

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


Re: Loud "pop" coming from hard drive on reboot

2007-04-17 Thread Mark Lord

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 <[EMAIL PROTECTED]>:

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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-17 Thread Henrique de Moraes Holschuh
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-17 Thread Fabio Comolli

Hi.

On 4/17/07, Chuck Ebbert <[EMAIL PROTECTED]> wrote:



(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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-17 Thread emisca

2007/4/17, Chuck Ebbert <[EMAIL PROTECTED]>:

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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-17 Thread emisca

2007/4/17, Chuck Ebbert [EMAIL PROTECTED]:

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.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-17 Thread Fabio Comolli

Hi.

On 4/17/07, Chuck Ebbert [EMAIL PROTECTED] 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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-17 Thread Henrique de Moraes Holschuh
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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-17 Thread Mark Lord

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 [EMAIL PROTECTED]:

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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud pop coming from hard drive on reboot

2007-04-17 Thread Chuck Ebbert
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?

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


Re: Loud pop coming from hard drive on reboot

2007-04-17 Thread Mark Lord

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 [EMAIL PROTECTED]:

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? 

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


Re: Loud pop coming from hard drive on reboot

2007-04-17 Thread Tejun Heo
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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-16 Thread Chuck Ebbert
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?

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


Re: Loud pop coming from hard drive on reboot

2007-04-16 Thread Chuck Ebbert
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?

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


Re: Loud "pop" coming from hard drive on reboot

2007-04-15 Thread auxsvr
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Loud "pop" coming from hard drive on reboot

2007-04-15 Thread Jan Engelhardt

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
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


  1   2   >