Re: [PATCH] HZ==100 assumptions

Alan Cox (alan@lxorguk.ukuu.org.uk)
Fri, 23 Jul 1999 17:09:39 +0100 (BST)


> attached patch kills all HZ==100 assumptions i noticed in various
> drivers.

Most of these are wrong. It uses 1 to mean "defer as short as possible"

> - timer_table[COPRO_TIMER].expires = jiffies+100;
> + timer_table[COPRO_TIMER].expires = jiffies+HZ;
> timer_active |= 1<<COPRO_TIMER;
> printk(KERN_ERR "387 failed: trying to reset\n");
> send_sig(SIGFPE, current, 1);
> @@ -102,7 +102,7 @@ __initfunc(static void check_fpu(void))
> * should get there first..
> */
> printk(KERN_INFO "Checking 386/387 coupling... ");
> - timer_table[COPRO_TIMER].expires = jiffies+50;
> + timer_table[COPRO_TIMER].expires = jiffies+HZ/2;
> timer_table[COPRO_TIMER].fn = copro_timeout;

These are right

> */
> -#define TX_TIMEOUT 20
> +#define TX_TIMEOUT (20*HZ/100)

Likewise

> -#define MCAST_HOLD_TIME 10 /* in jiffies unit (10ms increment) */
> +#define MCAST_HOLD_TIME (10*HZ/100)

oops. Thats a nasty

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