Re: get_nohz_timer_target?
From: Thomas Gleixner
Date: Fri Jul 08 2016 - 05:08:17 EST
On Mon, 18 Apr 2016, Richard Cochran wrote:
> Looking at kernel/sched/core.c:get_nohz_timer_target(), I don't
> understand the change made in:
>
> commit 9642d18eee2cd169b60c6ac0f20bda745b5a3d1e
> Author: Vatika Harlalka <vatikaharlalka@xxxxxxxxx>
> Date: Tue Sep 1 16:50:59 2015 +0200
> nohz: Affine unpinned timers to housekeepers
>
> After that change, the code now reads like this:
>
> int i, cpu = smp_processor_id();
> struct sched_domain *sd;
>
> if (!idle_cpu(cpu) && is_housekeeping_cpu(cpu))
> return cpu;
>
> rcu_read_lock();
> for_each_domain(cpu, sd) {
> for_each_cpu(i, sched_domain_span(sd)) {
> if (!idle_cpu(i) && is_housekeeping_cpu(cpu)) {
> --------------------------------------------------------------- ^^^
> Was this supposed to be 'i' instead?
Yes. Care to send a patch?
Thanks,
tglx