* Jason Low <jason.l...@hp.com> [2015-04-08 19:39:15]: > On Wed, 2015-04-08 at 16:42 +0530, Srikar Dronamraju wrote: > > * Jason Low <jason.l...@hp.com> [2015-04-07 17:07:46]: > > > @@ -7687,7 +7700,7 @@ static inline bool nohz_kick_needed(struct rq *rq) > > > int nr_busy, cpu = rq->cpu; > > > bool kick = false; > > > > > > - if (unlikely(rq->idle_balance)) > > > + if (unlikely(idle_cpu(cpu))) > > > return false; > > > > > > The only other place that we use idle_balance is > > run_rebalance_domains(). Would it make sense to just use idle_cpu() in > > run_rebalance_domains() and remove rq->idle_balance? > > Hi Srikar, > > So the idle_balance is used for storing the idle state of the CPU before > calling the softirq, for load balancing decisions. In that case, we may > need to keep this extra variable in order to store that information. >
I am not sure if you got what I wanted to convey. rq->idle_balance gets updated at every scheduler_tick() but the only user of rq->idle_balance (after your change) seems to be run_rebalance_domains(). Now can we remove rq->idle_balance. This would mean we would have to call idle_cpu() instead of using rq->idle_balance in run_rebalance_domains(). (similar to what your above change) That way we can reduce the rq struct size and we might end up calling idle_cpu() lesser number of times. -- Thanks and Regards Srikar Dronamraju -- 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/