lkml.org 
[lkml]   [2011]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [patch v3 1/6] sched, nohz: introduce nohz_flags in the struct rq
From
Date
On Tue, 2011-12-06 at 04:14 -0800, Srivatsa Vaddagiri wrote:
> * Suresh Siddha <suresh.b.siddha@intel.com> [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?

correct. Thanks again. Peter, can you queue the appended fix too?

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

we do use it currently in the find_new_ilb().

thanks,
suresh
---

From: Suresh Siddha <suresh.b.siddha@intel.com>
Subject: sched, nohz: set the NOHZ_BALANCE_KICK flag for idle load balancer

Intention is to set the NOHZ_BALANCE_KICK flag for the 'ilb_cpu'. Not
for the 'cpu' which is the local cpu. Fix the typo.

Reported-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
kernel/sched/fair.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 65a6f8b..9e34688 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4852,7 +4852,7 @@ static void nohz_balancer_kick(int cpu)
if (ilb_cpu >= nr_cpu_ids)
return;

- if (test_and_set_bit(NOHZ_BALANCE_KICK, nohz_flags(cpu)))
+ if (test_and_set_bit(NOHZ_BALANCE_KICK, nohz_flags(ilb_cpu)))
return;
/*
* Use smp_send_reschedule() instead of resched_cpu().



\
 
 \ /
  Last update: 2011-12-06 20:25    [W:0.083 / U:0.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site