Re: [patch v3 1/6] sched, nohz: introduce nohz_flags in the struct rq

From: Srivatsa Vaddagiri
Date: Tue Dec 06 2011 - 07:14:43 EST


* Suresh Siddha <suresh.b.siddha@xxxxxxxxx> [2011-12-01 17:07:32]:

> @@ -4866,18 +4866,15 @@ static void nohz_balancer_kick(int cpu)
> return;
> }
>
> - if (!cpu_rq(ilb_cpu)->nohz_balance_kick) {
> - cpu_rq(ilb_cpu)->nohz_balance_kick = 1;
> -
> - smp_mb();
> - /*
> - * Use smp_send_reschedule() instead of resched_cpu().
> - * This way we generate a sched IPI on the target cpu which
> - * is idle. And the softirq performing nohz idle load balance
> - * will be run before returning from the IPI.
> - */
> - smp_send_reschedule(ilb_cpu);
> - }
> + if (test_and_set_bit(NOHZ_BALANCE_KICK, nohz_flags(cpu)))

s/cpu/ilb_cpu?

Also given that 'cpu' argument to nohz_balancer_kick() is no longer used, we can
avoid passing any argument to it as well ..

> + return;
> + /*
> + * Use smp_send_reschedule() instead of resched_cpu().
> + * This way we generate a sched IPI on the target cpu which
> + * is idle. And the softirq performing nohz idle load balance
> + * will be run before returning from the IPI.
> + */
> + smp_send_reschedule(ilb_cpu);
> return;
> }

- vatsa

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