lkml.org 
[lkml]   [2006]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] percpu data: only iterate over possible CPUs
    On Sun, 5 Feb 2006, Linux Kernel Mailing List wrote:

    > [PATCH] percpu data: only iterate over possible CPUs

    This sched.c bit breaks Xen, and probably also other architectures
    that have CPU hotplug. I suspect the reason is that during early
    bootup only the boot CPU is online, so nothing initialises the
    runqueues for CPUs that are brought up afterwards.

    I suspect we can get rid of this problem quite easily by moving
    runqueue initialisation to init_idle()...

    > diff --git a/kernel/sched.c b/kernel/sched.c
    > index f77f23f..839466f 100644
    > --- a/kernel/sched.c
    > +++ b/kernel/sched.c
    > @@ -6109,7 +6109,7 @@ void __init sched_init(void)
    > runqueue_t *rq;
    > int i, j, k;
    >
    > - for (i = 0; i < NR_CPUS; i++) {
    > + for_each_cpu(i) {
    > prio_array_t *array;
    >
    > rq = cpu_rq(i);

    --
    All Rights Reversed
    -
    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: 2006-02-08 23:34    [W:0.038 / U:0.772 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site