Messages in this thread Patch in this message | | | Date | Wed, 21 Jul 1999 07:19:46 +0200 | From | Artur Skawina <> | Subject | Re: Measured overhead of timer interrupts |
| |
Albert D. Cahalan wrote: > > You don't even need to hack /proc to hide the non-standard HZ.
even if it's no longer an issue for modern pstools there are quite a few places where HZ still makes a difference - in addition to the ones previously mentioned there are at least also:
o /proc/net/(tcp|udp|whatever) o /proc/net/ipv4/igmp o /proc/net/ipv4/ip_masq* o /proc/net/ipv6/* o sg SG_(GET|SET)_TIMEOUT
+ a bunch of drivers that assume HZ==100
The networking stuff in particular needs fixing, otherwise the timer values displayed eg by netstat look 'interesting'.
If anybody wants to try a higher HZ then something like the attached patch should be enough. But it probably still misses a few things (suggestions welcome).
[it should apply more or less cleanly to a recent kernel, but may need some manual tweaking. Only multiples of 100 recommended for now. I'll do this right when porting to 2.3.1[1-3] ;) ] diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/arch/i386/Makefile linux-2.3.5as/arch/i386/Makefile --- /img/linux-2.3.5/arch/i386/Makefile Thu May 20 01:59:04 1999 +++ linux-2.3.5as/arch/i386/Makefile Tue Jul 20 21:44:57 1999 endif ifdef CONFIG_M686 -CFLAGS := $(CFLAGS) -DCPU=686 +CFLAGS := $(CFLAGS) -DCPU=686 -DHZ=400 CFLAGS += $(shell if $(CC) -march=i686 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=i686"; fi) AFLAGS := $(AFLAGS) -DCPU=686 endif diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/arch/i386/kernel/irq.c linux-2.3.5as/arch/i386/kernel/irq.c --- /img/linux-2.3.5/arch/i386/kernel/irq.c Wed May 12 19:30:30 1999 +++ linux-2.3.5as/arch/i386/kernel/irq.c Tue Jul 20 01:39:25 1999 @@ -1104,7 +1108,7 @@ __initfunc(void init_IRQ(void)) request_region(0xa0,0x20,"pic2"); /* - * Set the clock to 100 Hz, we already have a valid + * Set the clock to HZ Hz, we already have a valid * vector now: */ outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */ diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/drivers/cdrom/gscd.c linux-2.3.5as/drivers/cdrom/gscd.c --- /img/linux-2.3.5/drivers/cdrom/gscd.c Thu May 20 01:59:06 1999 +++ linux-2.3.5as/drivers/cdrom/gscd.c Tue Jul 20 21:37:25 1999 @@ -355,7 +355,7 @@ char cmd[] = { CMD_READ, 0x80, 0,0,0, end_request(1); } } - SET_TIMER(do_gscd_request, 1); + SET_TIMER(do_gscd_request, HZ/100); } diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/drivers/cdrom/mcd.c linux-2.3.5as/drivers/cdrom/mcd.c --- /img/linux-2.3.5/drivers/cdrom/mcd.c Sat May 15 13:08:32 1999 +++ linux-2.3.5as/drivers/cdrom/mcd.c Tue Jul 20 21:38:33 1999 @@ -675,7 +675,7 @@ do_mcd_request(void) } mcd_state = MCD_S_START; McdTries = 5; - SET_TIMER(mcd_poll, 1); + SET_TIMER(mcd_poll, HZ/100); } break; } @@ -1070,7 +1070,7 @@ mcd_poll(void) mcd_state = MCD_S_STOP; } - SET_TIMER(mcd_poll, 1); + SET_TIMER(mcd_poll, HZ/100); } @@ -1365,7 +1365,7 @@ mcdStatTimer(void) return; } - SET_TIMER(mcdStatTimer, 1); + SET_TIMER(mcdStatTimer, HZ/100); } @@ -1381,7 +1381,7 @@ getMcdStatus(int timeout) int st; McdTimeout = timeout; - SET_TIMER(mcdStatTimer, 1); + SET_TIMER(mcdStatTimer, HZ/100); sleep_on(&mcd_waitq); if (McdTimeout <= 0) return -1; diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/drivers/cdrom/sjcd.c linux-2.3.5as/drivers/cdrom/sjcd.c --- /img/linux-2.3.5/drivers/cdrom/sjcd.c Sat May 15 13:08:32 1999 +++ linux-2.3.5as/drivers/cdrom/sjcd.c Tue Jul 20 21:40:24 1999 @@ -363,7 +363,7 @@ static void sjcd_status_timer( void ){ /* * We have still some time to wait. Try again. */ - SJCD_SET_TIMER( sjcd_status_timer, 1 ); + SJCD_SET_TIMER( sjcd_status_timer, HZ/100 ); } } @@ -373,7 +373,7 @@ static void sjcd_status_timer( void ){ */ static int sjcd_wait_for_status( void ){ sjcd_status_timeout = SJCD_WAIT_FOR_STATUS_TIMEOUT; - SJCD_SET_TIMER( sjcd_status_timer, 1 ); + SJCD_SET_TIMER( sjcd_status_timer, HZ/100 ); sleep_on( &sjcd_waitq ); #if defined( SJCD_DIAGNOSTIC ) || defined ( SJCD_TRACE ) if( sjcd_status_timeout <= 0 ) @@ -1269,7 +1269,7 @@ static void sjcd_poll( void ){ * Get back in some time. 1 should be replaced with count variable to * avoid unnecessary testings. */ - SJCD_SET_TIMER( sjcd_poll, 1 ); + SJCD_SET_TIMER( sjcd_poll, HZ/100 ); } static void do_sjcd_request( void ){ diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/drivers/scsi/i91uscsi.c linux-2.3.5as/drivers/scsi/i91uscsi.c --- /img/linux-2.3.5/drivers/scsi/i91uscsi.c Thu Jan 14 18:31:41 1999 +++ linux-2.3.5as/drivers/scsi/i91uscsi.c Tue Jul 20 06:10:43 1999 @@ -219,7 +219,7 @@ extern int tul_num_ch; static void tul_do_pause(unsigned amount) { /* Pause for amount*10 milliseconds */ - unsigned long the_time = jiffies + amount; /* 0.01 seconds per jiffy */ + unsigned long the_time = jiffies + (amount*(HZ/100)); #if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95) while (time_before_eq(jiffies, the_time)); diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/drivers/scsi/sg.c linux-2.3.5as/drivers/scsi/sg.c --- /img/linux-2.3.5/drivers/scsi/sg.c Sat May 15 23:31:38 1999 +++ linux-2.3.5as/drivers/scsi/sg.c Tue Jul 20 21:28:22 1999 @@ -484,9 +484,12 @@ static int sg_ioctl(struct inode * inode switch(cmd_in) { case SG_SET_TIMEOUT: - return get_user(sfp->timeout, (int *)arg); + result = get_user(val, (int *)arg); + if (result) return result; + sfp->timeout = HZFROMUSER(val); + return result; /* 0 */ case SG_GET_TIMEOUT: - return sfp->timeout; /* strange ..., for backward compatibility */ + return HZTOUSER(sfp->timeout); /* strange ..., for backward compatibility */ case SG_SET_FORCE_LOW_DMA: result = get_user(val, (int *)arg); if (result) return result; diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/fs/proc/array.c linux-2.3.5as/fs/proc/array.c --- /img/linux-2.3.5/fs/proc/array.c Sat May 15 13:08:42 1999 +++ linux-2.3.5as/fs/proc/array.c Tue Jul 20 00:58:23 1999 @@ -240,19 +241,19 @@ static int get_kstat(char * buffer) #ifdef __SMP__ len = sprintf(buffer, "cpu %u %u %u %lu\n", - kstat.cpu_user, - kstat.cpu_nice, - kstat.cpu_system, - jiffies*smp_num_cpus - (kstat.cpu_user + kstat.cpu_nice + kstat.cpu_system)); + HZTOUSER(kstat.cpu_user), + HZTOUSER(kstat.cpu_nice), + HZTOUSER(kstat.cpu_system), + HZTOUSER(jiffies*smp_num_cpus - (kstat.cpu_user + kstat.cpu_nice + kstat.cpu_system))); for (i = 0 ; i < smp_num_cpus; i++) len += sprintf(buffer + len, "cpu%d %u %u %u %lu\n", i, - kstat.per_cpu_user[cpu_logical_map(i)], - kstat.per_cpu_nice[cpu_logical_map(i)], - kstat.per_cpu_system[cpu_logical_map(i)], - jiffies - ( kstat.per_cpu_user[cpu_logical_map(i)] \ + HZTOUSER(kstat.per_cpu_user[cpu_logical_map(i)]), + HZTOUSER(kstat.per_cpu_nice[cpu_logical_map(i)]), + HZTOUSER(kstat.per_cpu_system[cpu_logical_map(i)]), + HZTOUSER(jiffies - ( kstat.per_cpu_user[cpu_logical_map(i)] \ + kstat.per_cpu_nice[cpu_logical_map(i)] \ - + kstat.per_cpu_system[cpu_logical_map(i)])); + + kstat.per_cpu_system[cpu_logical_map(i)]))); len += sprintf(buffer + len, "disk %u %u %u %u\n" "disk_rio %u %u %u %u\n" @@ -273,10 +274,10 @@ static int get_kstat(char * buffer) "page %u %u\n" "swap %u %u\n" "intr %u", - kstat.cpu_user, - kstat.cpu_nice, - kstat.cpu_system, - ticks - (kstat.cpu_user + kstat.cpu_nice + kstat.cpu_system), + HZTOUSER(kstat.cpu_user), + HZTOUSER(kstat.cpu_nice), + HZTOUSER(kstat.cpu_system), + HZTOUSER(ticks - (kstat.cpu_user + kstat.cpu_nice + kstat.cpu_system)), #endif kstat.dk_drive[0], kstat.dk_drive[1], kstat.dk_drive[2], kstat.dk_drive[3], @@ -910,15 +911,15 @@ static int get_stat(int pid, char * buff tsk->cmin_flt, tsk->maj_flt, tsk->cmaj_flt, - tsk->times.tms_utime, - tsk->times.tms_stime, - tsk->times.tms_cutime, - tsk->times.tms_cstime, + HZTOUSER(tsk->times.tms_utime), + HZTOUSER(tsk->times.tms_stime), + HZTOUSER(tsk->times.tms_cutime), + HZTOUSER(tsk->times.tms_cstime), priority, nice, 0UL /* removed */, tsk->it_real_value, - tsk->start_time, + HZTOUSER(tsk->start_time), vsize, tsk->mm ? tsk->mm->rss : 0, /* you might want to shift this left 3 */ tsk->rlim ? tsk->rlim[RLIMIT_RSS].rlim_cur : 0, @@ -1229,14 +1230,14 @@ static int get_pidcpu(int pid, char * bu len = sprintf(buffer, "cpu %lu %lu\n", - tsk->times.tms_utime, - tsk->times.tms_stime); + HZTOUSER(tsk->times.tms_utime), + HZTOUSER(tsk->times.tms_stime)); for (i = 0 ; i < smp_num_cpus; i++) len += sprintf(buffer + len, "cpu%d %lu %lu\n", i, - tsk->per_cpu_utime[cpu_logical_map(i)], - tsk->per_cpu_stime[cpu_logical_map(i)]); + HZTOUSER(tsk->per_cpu_utime[cpu_logical_map(i)]), + HZTOUSER(tsk->per_cpu_stime[cpu_logical_map(i)])); return len; } diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/include/asm-i386/bugs.h linux-2.3.5as/include/asm-i386/bugs.h --- /img/linux-2.3.5/include/asm-i386/bugs.h Tue Jun 1 11:00:56 1999 +++ linux-2.3.5as/include/asm-i386/bugs.h Tue Jul 20 20:53:34 1999 @@ -44,7 +44,7 @@ static char __initdata fpu_error = 0; __initfunc(static void copro_timeout(void)) { fpu_error = 1; - 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; timer_active |= 1<<COPRO_TIMER; __asm__("clts ; fninit ; fnstcw %0 ; fwait":"=m" (*&control_word)); diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/include/asm-i386/param.h linux-2.3.5as/include/asm-i386/param.h --- /img/linux-2.3.5/include/asm-i386/param.h Tue Aug 1 15:08:17 1995 +++ linux-2.3.5as/include/asm-i386/param.h Tue Jul 20 02:14:21 1999 @@ -1,8 +1,18 @@ #ifndef _ASMi386_PARAM_H #define _ASMi386_PARAM_H +#include <linux/config.h> + #ifndef HZ #define HZ 100 +#endif + +#if HZ!=100 +/*#define HZTOUSER(hz) (((hz)*100)/HZ) would be better, but could overflow*/ +#define HZTOUSER(hz) ((hz)/(HZ/100)) +/*#define HZFROMUSER(hz) ((hz)*(HZ/100)) hmm, these will be small values, right?*/ +#define HZFROMUSER(hz) (((hz)*HZ)/100) +#define HZ_MASQUERADING (HZ/100) /* defined if masquerading, HZ/HZ_MASQUERADING==100 */ #endif #define EXEC_PAGESIZE 4096 diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/include/asm-mips/param.h linux-2.3.5as/include/asm-mips/param.h --- /img/linux-2.3.5/include/asm-mips/param.h Wed Jan 18 06:54:13 1995 +++ linux-2.3.5as/include/asm-mips/param.h Tue Jul 20 20:15:46 1999 @@ -1,9 +1,39 @@ #ifndef __ASM_MIPS_PARAM_H #define __ASM_MIPS_PARAM_H +#include <linux/config.h> + #ifndef HZ +#ifdef CONFIG_DECSTATION + /* + * log2(HZ), change this here if you want another + * HZ value. This is also used in dec_time_init. + * Minimum is 1, Maximum is 15. + */ +#define LOG_2_HZ 7 +#define HZ (1 << LOG_2_HZ) +#else /* !CONFIG_DECSTATION */ #define HZ 100 -#endif +#endif /* CONFIG_DECSTATION */ +#endif /* !defined(HZ) */ + +#if HZ!=100 +#ifdef CONFIG_DECSTATION + /* + * Ye olde division-by-multiplication trick. + * This works only if 100 / HZ <= 1 + */ +#define QUOTIENT ((1UL << (32 - LOG_2_HZ)) * 100) +#define HZTOUSER(a) \ + ({ int __res; \ + __asm__( \ + "multu\t%0,%2\n\t" \ + "mfhi\t%0" \ + : "=r" (__res): "0" (a), "r" (QUOTIENT)); \ + __res;}) +#define HZ_MASQUERADING (HZ/100) /* defined if masquerading, HZ/HZ_MASQUERADING==100 */ +#endif /* CONFIG_DECSTATION */ +#endif /* HZ!=100 */ #define EXEC_PAGESIZE 4096 diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/include/linux/arcdevice.h linux-2.3.5as/include/linux/arcdevice.h --- /img/linux-2.3.5/include/linux/arcdevice.h Tue Dec 29 19:18:18 1998 +++ linux-2.3.5as/include/linux/arcdevice.h Tue Jul 20 20:46:49 1999 @@ -69,7 +69,7 @@ * increased. The larger it is, though, the longer it will be between * necessary transmits - don't set this too large. */ -#define TX_TIMEOUT 20 +#define TX_TIMEOUT (20*HZ/100) /* Display warnings about the driver being an ALPHA version. diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/include/linux/lp.h linux-2.3.5as/include/linux/lp.h --- /img/linux-2.3.5/include/linux/lp.h Tue Jun 1 10:21:00 1999 +++ linux-2.3.5as/include/linux/lp.h Tue Jul 20 20:27:17 1999 @@ -74,7 +74,7 @@ #define LPGETFLAGS 0x060e /* get status flags */ #define LPTRUSTIRQ 0x060f /* set/unset the LP_TRUST_IRQ flag */ -/* timeout for printk'ing a timeout, in jiffies (100ths of a second). +/* timeout for printk'ing a timeout, in jiffies. This is also used for re-checking error conditions if LP_ABORT is not set. This is the default behavior. */ diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/include/linux/param.h linux-2.3.5as/include/linux/param.h --- /img/linux-2.3.5/include/linux/param.h Tue Aug 15 13:25:06 1995 +++ linux-2.3.5as/include/linux/param.h Tue Jul 20 02:14:42 1999 @@ -3,4 +3,10 @@ #include <asm/param.h> +/* if userspace sees the same HZ as the kernel then these are nops */ +#ifndef HZ_MASQUERADING +#define HZTOUSER(hz) (hz) +#define HZFROMUSER(hz) (hz) +#endif + #endif diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/include/net/pkt_sched.h linux-2.3.5as/include/net/pkt_sched.h --- /img/linux-2.3.5/include/net/pkt_sched.h Sat May 1 16:36:32 1999 +++ linux-2.3.5as/include/net/pkt_sched.h Tue Jul 20 21:12:17 1999 @@ -168,7 +168,11 @@ extern psched_time_t psched_time_base; #if HZ == 100 #define PSCHED_JSCALE 13 -#elif HZ == 1024 +#elif HZ <= 200 +#define PSCHED_JSCALE 12 +#elif HZ <= 512 +#define PSCHED_JSCALE 11 +#elif HZ <= 1024 #define PSCHED_JSCALE 10 #else #define PSCHED_JSCALE 0 diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/kernel/acct.c linux-2.3.5as/kernel/acct.c --- /img/linux-2.3.5/kernel/acct.c Sat May 1 16:36:01 1999 +++ linux-2.3.5as/kernel/acct.c Tue Jul 20 00:59:49 1999 @@ -292,9 +292,9 @@ static int do_acct_process(long exitcode ac.ac_comm[ACCT_COMM - 1] = '\0'; ac.ac_btime = CT_TO_SECS(current->start_time) + (xtime.tv_sec - (jiffies / HZ)); - ac.ac_etime = encode_comp_t(jiffies - current->start_time); - ac.ac_utime = encode_comp_t(current->times.tms_utime); - ac.ac_stime = encode_comp_t(current->times.tms_stime); + ac.ac_etime = encode_comp_t(HZTOUSER(jiffies - current->start_time)); + ac.ac_utime = encode_comp_t(HZTOUSER(current->times.tms_utime)); + ac.ac_stime = encode_comp_t(HZTOUSER(current->times.tms_stime)); ac.ac_uid = current->uid; ac.ac_gid = current->gid; ac.ac_tty = (current->tty) ? kdev_t_to_nr(current->tty->device) : 0; diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/kernel/signal.c linux-2.3.5as/kernel/signal.c --- /img/linux-2.3.5/kernel/signal.c Tue Jun 1 10:21:01 1999 +++ linux-2.3.5as/kernel/signal.c Tue Jul 20 00:36:17 1999 @@ -583,8 +583,8 @@ notify_parent(struct task_struct *tsk, i info.si_pid = tsk->pid; /* FIXME: find out whether or not this is supposed to be c*time. */ - info.si_utime = tsk->times.tms_utime; - info.si_stime = tsk->times.tms_stime; + info.si_utime = HZTOUSER(tsk->times.tms_utime); + info.si_stime = HZTOUSER(tsk->times.tms_stime); why = SI_KERNEL; /* shouldn't happen */ switch (tsk->state) { diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/kernel/sys.c linux-2.3.5as/kernel/sys.c --- /img/linux-2.3.5/kernel/sys.c Sat May 15 13:08:47 1999 +++ linux-2.3.5as/kernel/sys.c Tue Jul 20 22:03:54 1999 @@ -612,9 +614,23 @@ asmlinkage long sys_times(struct tms * t * as if the syscall took an instant longer to occur. */ if (tbuf) + { +#if HZ_MASQUERADING + struct tms t; + + t.tms_utime = HZTOUSER(current->times.tms_utime); + t.tms_stime = HZTOUSER(current->times.tms_stime); + t.tms_cutime = HZTOUSER(current->times.tms_cutime); + t.tms_cstime = HZTOUSER(current->times.tms_cstime); + + if (copy_to_user(tbuf, &t, sizeof(struct tms))) + return -EFAULT; +#else if (copy_to_user(tbuf, ¤t->times, sizeof(struct tms))) return -EFAULT; - return jiffies; +#endif + } + return HZTOUSER(jiffies); } /* diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/net/ipv4/igmp.c linux-2.3.5as/net/ipv4/igmp.c --- /img/linux-2.3.5/net/ipv4/igmp.c Tue Jun 1 10:21:04 1999 +++ linux-2.3.5as/net/ipv4/igmp.c Tue Jul 20 12:17:08 1999 @@ -673,7 +673,7 @@ int ip_mc_procinfo(char *buffer, char ** len+=sprintf(buffer+len, "\t\t\t\t%08lX %5d %d:%08lX\t\t%d\n", im->multiaddr, im->users, - im->tm_running, im->timer.expires-jiffies, im->reporter); + im->tm_running, HZTOUSER(im->timer.expires-jiffies), im->reporter); pos=begin+len; if(pos<offset) diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/net/ipv4/ip_masq.c linux-2.3.5as/net/ipv4/ip_masq.c --- /img/linux-2.3.5/net/ipv4/ip_masq.c Sat May 1 16:35:40 1999 +++ linux-2.3.5as/net/ipv4/ip_masq.c Tue Jul 20 12:29:32 1999 @@ -2204,7 +2204,7 @@ static int ip_msqhst_procinfo(char *buff ms->out_seq.init_seq, ms->out_seq.delta, ms->out_seq.previous_delta, - ms->timer.expires-jiffies); + HZTOUSER(ms->timer.expires-jiffies)); len += sprintf(buffer+len, "%-127s\n", temp); if(len >= length) { diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/net/ipv4/ip_masq_autofw.c linux-2.3.5as/net/ipv4/ip_masq_autofw.c --- /img/linux-2.3.5/net/ipv4/ip_masq_autofw.c Sun Oct 4 17:21:45 1998 +++ linux-2.3.5as/net/ipv4/ip_masq_autofw.c Tue Jul 20 12:35:46 1999 @@ -363,7 +363,7 @@ static int autofw_procinfo(char *buffer, ntohl(af->lastcontact), af->ctlproto, af->ctlport, - (af->timer.expires<jiffies ? 0 : af->timer.expires-jiffies), + (af->timer.expires<jiffies ? 0 : HZTOUSER(af->timer.expires-jiffies)), af->flags); pos=begin+len; diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/net/ipv4/proc.c linux-2.3.5as/net/ipv4/proc.c --- /img/linux-2.3.5/net/ipv4/proc.c Tue Jun 1 10:21:04 1999 +++ linux-2.3.5as/net/ipv4/proc.c Tue Jul 20 11:53:56 1999 @@ -65,7 +65,7 @@ static inline void get__openreq(struct s TCP_SYN_RECV, 0,0, /* could print option size, but that is af dependent. */ 1, /* timers active (only the expire timer) */ - (unsigned long)(req->expires - jiffies), + HZTOUSER((unsigned long)(req->expires - jiffies)), req->retrans, sk->socket ? sk->socket->inode->i_uid : 0, 0, /* non standard timer */ @@ -140,7 +140,7 @@ static inline void get__sock(struct sock 0 : (format == 0) ? tp->rcv_nxt-tp->copied_seq: atomic_read(&sp->rmem_alloc)), - timer_active, timer_expires-jiffies, + timer_active, HZTOUSER(timer_expires-jiffies), (tw_bucket ? 0 : tp->retransmits), (!tw_bucket && sp->socket) ? sp->socket->inode->i_uid : 0, (!tw_bucket && timer_active) ? sp->timeout : 0, diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/net/ipv6/mcast.c linux-2.3.5as/net/ipv6/mcast.c --- /img/linux-2.3.5/net/ipv6/mcast.c Thu Jun 3 12:39:30 1999 +++ linux-2.3.5as/net/ipv6/mcast.c Tue Jul 20 12:38:23 1999 @@ -635,7 +635,7 @@ static int igmp6_read_proc(char *buffer, " %5d %08X %ld\n", atomic_read(&im->mca_users), im->mca_flags, - (im->mca_flags&MAF_TIMER_RUNNING) ? im->mca_timer.expires-jiffies : 0); + (im->mca_flags&MAF_TIMER_RUNNING) ? HZTOUSER(im->mca_timer.expires-jiffies) : 0); pos=begin+len; if (pos < offset) { diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/net/ipv6/proc.c linux-2.3.5as/net/ipv6/proc.c --- /img/linux-2.3.5/net/ipv6/proc.c Tue Jun 1 10:21:05 1999 +++ linux-2.3.5as/net/ipv6/proc.c Tue Jul 20 12:04:31 1999 @@ -119,7 +119,7 @@ static int get__netinfo6(struct proto *p (format == 0) ? tp->rcv_nxt-tp->copied_seq : atomic_read(&sp->rmem_alloc)), - timer_active, timer_expires-jiffies, + timer_active, HZTOUSER(timer_expires-jiffies), (tw_bucket ? 0 : tp->retransmits), ((!tw_bucket && sp->socket) ? sp->socket->inode->i_uid : 0), diff -urNp --exclude-from /usr/src/lkdontdiff /img/linux-2.3.5/include/net/br.h linux-2.3.5as/include/net/br.h --- /img/linux-2.3.5/include/net/br.h Sun Mar 7 23:25:23 1999 +++ linux-2.3.5as/include/net/br.h Tue Jul 20 21:00:27 1999 @@ -42,7 +42,7 @@ /* broacast/multicast storm limitation. This per source. */ #define MAX_MCAST_PER_PERIOD 4 -#define MCAST_HOLD_TIME 10 /* in jiffies unit (10ms increment) */ +#define MCAST_HOLD_TIME (10*HZ/100) #define Default_path_cost 10 | |