lkml.org 
[lkml]   [2004]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] s390 (9/9): no timer interrupts in idle.
On Wed, Apr 21, 2004 at 08:52:06PM +0200, Martin Schwidefsky wrote:
> diff -urN linux-2.6/kernel/rcupdate.c linux-2.6-s390/kernel/rcupdate.c
> --- linux-2.6/kernel/rcupdate.c Wed Apr 21 20:25:10 2004
> +++ linux-2.6-s390/kernel/rcupdate.c Wed Apr 21 20:25:33 2004
> @@ -96,6 +96,10 @@
> }
> }
>
> +#ifndef __ARCH_HAS_IDLE_CPU_MASK
> +#define idle_cpu_mask CPU_MASK_NONE
> +#endif
> +
> /*
> * Register a new batch of callbacks, and start it up if there is currently no
> * active batch and the batch to be registered has not already occurred.
> @@ -111,7 +115,10 @@
> return;
> }
> /* Can't change, since spin lock held. */
> - rcu_ctrlblk.rcu_cpu_mask = cpu_online_map;
> + rcu_ctrlblk.rcu_cpu_mask = idle_cpu_mask;
> + cpus_complement(rcu_ctrlblk.rcu_cpu_mask);
> + cpus_and(rcu_ctrlblk.rcu_cpu_mask, cpu_online_map,
> + rcu_ctrlblk.rcu_cpu_mask);
> }

Defining idle_cpu_mask in the middle of RCU code is really not a good idea.
A cleaner solution would be to define idle_cpu_mask in sched.c
and initialize it to CPU_MASK_NONE there. You could put it in
sched.h, but then there is the likelyhood of people using
idle_cpu_mask for things other than initialization in which
case NR_CPUS > 64 compilation will fail.

Thanks
Dipankar
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.264 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site