public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* IDE: strange WAIT_READY dependency on APM
@ 2004-12-09  3:44 Adrian Bunk
  2004-12-09 10:53 ` Pavel Machek
  2004-12-10 15:20 ` Alan Cox
  0 siblings, 2 replies; 4+ messages in thread
From: Adrian Bunk @ 2004-12-09  3:44 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Alan Cox; +Cc: linux-kernel

IDE contains the following strange code:

<--  snip  -->

#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
#define WAIT_READY      (5*HZ)          /* 5sec - some laptops are very slow */
#else
#define WAIT_READY      (HZ/10)         /* 100msec - should be instantaneous */
#endif /* CONFIG_APM || CONFIG_APM_MODULE */

<--  snip  -->

On the one hand APM isn't enabled on all laptops.
On the other hand, this also affects regular PCs with APM support (or 
using a distribution kernel with APM support).

The time for the !APM case was already increased from 30msec in 2.4 .
Isn't there a timeout that is suitable for all cases?

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: IDE: strange WAIT_READY dependency on APM
  2004-12-09  3:44 IDE: strange WAIT_READY dependency on APM Adrian Bunk
@ 2004-12-09 10:53 ` Pavel Machek
  2004-12-10 15:20 ` Alan Cox
  1 sibling, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2004-12-09 10:53 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Bartlomiej Zolnierkiewicz, Alan Cox, linux-kernel

Hi!

> IDE contains the following strange code:
> 
> <--  snip  -->
> 
> #if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
> #define WAIT_READY      (5*HZ)          /* 5sec - some laptops are very slow */
> #else
> #define WAIT_READY      (HZ/10)         /* 100msec - should be instantaneous */
> #endif /* CONFIG_APM || CONFIG_APM_MODULE */
> 
> <--  snip  -->
> 
> On the one hand APM isn't enabled on all laptops.
> On the other hand, this also affects regular PCs with APM support (or 
> using a distribution kernel with APM support).
> 
> The time for the !APM case was already increased from 30msec in 2.4 .
> Isn't there a timeout that is suitable for all cases?

We should probably always make it the "big" timeout. Or put there
HZ/10, and see who screams :-).

								Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

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

* Re: IDE: strange WAIT_READY dependency on APM
  2004-12-09  3:44 IDE: strange WAIT_READY dependency on APM Adrian Bunk
  2004-12-09 10:53 ` Pavel Machek
@ 2004-12-10 15:20 ` Alan Cox
  2004-12-11 17:30   ` [2.6 patch] IDE: remove " Adrian Bunk
  1 sibling, 1 reply; 4+ messages in thread
From: Alan Cox @ 2004-12-10 15:20 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Bartlomiej Zolnierkiewicz, Linux Kernel Mailing List

On Iau, 2004-12-09 at 03:44, Adrian Bunk wrote:
> The time for the !APM case was already increased from 30msec in 2.4 .
> Isn't there a timeout that is suitable for all cases?

The five seconds should be just fine for all cases. The smaller value
with no
power manglement should help speed up recovery however. It probably
doesn't belong CONFIG_APM now ACPI and friends are involved either.


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

* [2.6 patch] IDE: remove WAIT_READY dependency on APM
  2004-12-10 15:20 ` Alan Cox
@ 2004-12-11 17:30   ` Adrian Bunk
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2004-12-11 17:30 UTC (permalink / raw)
  To: Alan Cox; +Cc: Bartlomiej Zolnierkiewicz, Linux Kernel Mailing List

On Fri, Dec 10, 2004 at 03:20:05PM +0000, Alan Cox wrote:
> On Iau, 2004-12-09 at 03:44, Adrian Bunk wrote:
> > The time for the !APM case was already increased from 30msec in 2.4 .
> > Isn't there a timeout that is suitable for all cases?
> 
> The five seconds should be just fine for all cases. The smaller value
> with no
> power manglement should help speed up recovery however. It probably
> doesn't belong CONFIG_APM now ACPI and friends are involved either.


Thanks for this information. A patch is below.


Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.10-rc2-mm4-full/include/linux/ide.h.old	2004-12-11 18:11:20.000000000 +0100
+++ linux-2.6.10-rc2-mm4-full/include/linux/ide.h	2004-12-11 18:11:32.000000000 +0100
@@ -187,11 +187,7 @@
  * Timeouts for various operations:
  */
 #define WAIT_DRQ	(HZ/10)		/* 100msec - spec allows up to 20ms */
-#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
 #define WAIT_READY	(5*HZ)		/* 5sec - some laptops are very slow */
-#else
-#define WAIT_READY	(HZ/10)		/* 100msec - should be instantaneous */
-#endif /* CONFIG_APM || CONFIG_APM_MODULE */
 #define WAIT_PIDENTIFY	(10*HZ)	/* 10sec  - should be less than 3ms (?), if all ATAPI CD is closed at boot */
 #define WAIT_WORSTCASE	(30*HZ)	/* 30sec  - worst case when spinning up */
 #define WAIT_CMD	(10*HZ)	/* 10sec  - maximum wait for an IRQ to happen */


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

end of thread, other threads:[~2004-12-11 17:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-09  3:44 IDE: strange WAIT_READY dependency on APM Adrian Bunk
2004-12-09 10:53 ` Pavel Machek
2004-12-10 15:20 ` Alan Cox
2004-12-11 17:30   ` [2.6 patch] IDE: remove " Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox