Messages in this thread | | | Date | Wed, 21 Apr 2004 16:31:48 +0100 | From | Christoph Hellwig <> | Subject | Re: [PATCH] s390 (9/9): no timer interrupts in idle. |
| |
> +++ linux-2.6-s390/include/linux/rcupdate.h Wed Apr 21 16:29:41 2004 > @@ -121,6 +121,34 @@ > return 0; > } > > +#ifdef CONFIG_NO_IDLE_HZ > + > +extern cpumask_t idle_cpu_mask; > + > +/* > + * RCU is build for ticking systems. Without the HZ timer > + * we have not enought state changes which may result in a > + * never finished RCU request. > + * In a tickless system we don't want to wake idle CPUs just > + * to finish the RCU request. That is possible because the > + * idle CPUs satisfy the quiescilant RCU condition anyway. > + */ > +static inline void rcu_set_active_cpu_map(cpumask_t *mask) > +{ > + cpumask_t active = idle_cpu_mask; > + cpus_complement(active); > + cpus_and(*mask, cpu_online_map, active); > +} > + > +#else > + > +static inline void rcu_set_active_cpu_map(cpumask_t *mask) > +{ > + *mask = cpu_online_map; > +} > + > +#endif
This is a bit ugly. What about inlining the CONFIG_NO_IDLE_HZ case of this function in it's only caller and define idle_cpu_mask to an empty cpu mask for all other arches?
> --- linux-2.6/include/linux/sysctl.h Wed Apr 21 16:29:19 2004 > +++ linux-2.6-s390/include/linux/sysctl.h Wed Apr 21 16:29:41 2004 > @@ -132,6 +132,7 @@ > KERN_PTY=62, /* dir: pty driver */ > KERN_NGROUPS_MAX=63, /* int: NGROUPS_MAX */ > KERN_SPARC_SCONS_PWROFF=64, /* int: serial console power-off halt */ > + KERN_S390_HZ_TIMER=64, /* int: hz timer on or off */
Kill the S390, this seems usefull for a bunch of other architectures.
> --- linux-2.6/include/linux/timer.h Sun Apr 4 05:37:37 2004 > +++ linux-2.6-s390/include/linux/timer.h Wed Apr 21 16:29:41 2004 > @@ -65,6 +65,10 @@ > extern int __mod_timer(struct timer_list *timer, unsigned long expires); > extern int mod_timer(struct timer_list *timer, unsigned long expires); > > +#ifdef CONFIG_NO_IDLE_HZ > +extern unsigned long next_timer_interrupt(void); > +#endif
kill the ifdef. externs don't need to be cpp'ed away.
> --- linux-2.6/kernel/sysctl.c Wed Apr 21 16:29:19 2004 > +++ linux-2.6-s390/kernel/sysctl.c Wed Apr 21 16:29:41 2004 > @@ -108,6 +108,10 @@ > extern int sysctl_userprocess_debug; > #endif > > +#ifdef CONFIG_NO_IDLE_HZ > +extern int sysctl_hz_timer;
dito.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |