Hi Frederic,

On Thu, 20 Dec 2012 19:33:07 +0100, Frederic Weisbecker wrote:
> When a CPU is in full dynticks mode, try to switch
> it to nohz mode from the interrupt exit path if it is
> running a single non-idle task.
>
> Then restart the tick if necessary if we are enqueuing a
> second task while the timer is stopped, so that the scheduler
> tick is rearmed.
>
> [TODO: Check remaining things to be done from scheduler_tick()]
>
> [ Included build fix from Geoff Levand ]
[snip]
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index db3d4df..f3d8f4a 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -943,6 +943,14 @@ static inline u64 steal_ticks(u64 steal)
>  static inline void inc_nr_running(struct rq *rq)
>  {
>       rq->nr_running++;
> +
> +     if (rq->nr_running == 2) {
> +             if (tick_nohz_full_cpu(rq->cpu)) {
> +                     /* Order rq->nr_running write against the IPI */
> +                     smp_wmb();
> +                     smp_send_reschedule(rq->cpu);
> +             }
> +     }

This block should be guarded with #ifdef CONFIG_SMP, otherwise:

  CC      kernel/sched/core.o
In file included from /home/namhyung/project/linux/kernel/sched/core.c:85:0:
/home/namhyung/project/linux/kernel/sched/sched.h: In function ‘inc_nr_running’:
/home/namhyung/project/linux/kernel/sched/sched.h:960:28: error: ‘struct rq’ 
has no member named ‘cpu’
/home/namhyung/project/linux/kernel/sched/sched.h:963:26: error: ‘struct rq’ 
has no member named ‘cpu’


Thanks,
Namhyung

>  }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to