public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390 (9/9): no timer interrupts in idle.
Date: Wed, 21 Apr 2004 16:31:48 +0100	[thread overview]
Message-ID: <20040421163148.B7211@infradead.org> (raw)
In-Reply-To: <20040421144948.GJ2951@mschwid3.boeblingen.de.ibm.com>; from schwidefsky@de.ibm.com on Wed, Apr 21, 2004 at 04:49:48PM +0200

> +++ 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.  


  reply	other threads:[~2004-04-21 15:31 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-21 14:49 [PATCH] s390 (9/9): no timer interrupts in idle Martin Schwidefsky
2004-04-21 15:31 ` Christoph Hellwig [this message]
2004-04-22  8:02 ` Arjan van de Ven
  -- strict thread matches above, loose matches on Subject: below --
2004-04-21 16:31 Martin Schwidefsky
2004-04-21 16:32 ` Christoph Hellwig
2004-04-21 16:37 Martin Schwidefsky
2004-04-21 20:43 ` Dipankar Sarma
2004-04-21 20:46   ` Christoph Hellwig
2004-04-21 21:01     ` Dipankar Sarma
2004-04-21 18:52 Martin Schwidefsky
2004-04-21 21:58 ` Dipankar Sarma
     [not found] <1Nt5d-84u-3@gated-at.bofh.it>
     [not found] ` <1NwPD-2RW-37@gated-at.bofh.it>
     [not found]   ` <1NwPE-2RW-39@gated-at.bofh.it>
     [not found]     ` <1Nx8Y-3ev-15@gated-at.bofh.it>
2004-04-21 22:38       ` Andi Kleen
2004-04-22  8:48 Martin Schwidefsky
2004-04-22  8:52 ` Arjan van de Ven
2004-04-22  8:55 Martin Schwidefsky
2004-04-22 10:53 Martin Schwidefsky
2004-04-22 10:56 ` Arjan van de Ven
2004-04-22 11:09 Martin Schwidefsky
2004-04-22 11:14 ` Arjan van de Ven
2004-04-22 12:14 Martin Schwidefsky
2004-04-22 12:25 ` Arjan van de Ven
2004-04-22 12:44 Martin Schwidefsky
2004-04-22 13:11 ` Arjan van de Ven
2004-04-23  3:32 ` George Anzinger
2004-04-22 14:56 Martin Schwidefsky
2004-04-28 19:07 ` Dipankar Sarma
2004-04-23  8:48 Martin Schwidefsky
2004-04-29  7:43 Martin Schwidefsky
2004-04-29  8:16 ` Dipankar Sarma
2004-04-29  8:24 Martin Schwidefsky
2004-04-29 12:06 ` Dipankar Sarma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040421163148.B7211@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox