Re: [PATCH] sched/core: add unlikely in group_has_capacity()

2020-08-17 Thread Vincent Guittot
On Wed, 12 Aug 2020 at 03:49, Qi Zheng wrote: > > On 2020/8/7 上午10:47, Qi Zheng wrote: > > Yeah, because of the following two points, I also think > > the probability is 0%: > > a) the sd is protected by rcu lock, and load_balance() > > func is between rcu_read_lock() and rcu_read_unlock(). >

Re: [PATCH] sched/core: add unlikely in group_has_capacity()

2020-08-11 Thread Qi Zheng
On 2020/8/7 上午10:47, Qi Zheng wrote: Yeah, because of the following two points, I also think the probability is 0%: a) the sd is protected by rcu lock, and load_balance()    func is between rcu_read_lock() and rcu_read_unlock(). b) the sgs is a local variable. So in the group_classify(), the

Re: [PATCH] sched/core: add unlikely in group_has_capacity()

2020-08-06 Thread Qi Zheng
Yeah, because of the following two points, I also think the probability is 0%: a) the sd is protected by rcu lock, and load_balance() func is between rcu_read_lock() and rcu_read_unlock(). b) the sgs is a local variable. So in the group_classify(), the env->sd->imbalance_pct and the

Re: [PATCH] sched/core: add unlikely in group_has_capacity()

2020-08-06 Thread Ingo Molnar
* Qi Zheng wrote: > 1. The group_has_capacity() function is only called in >group_classify(). > 2. Before calling the group_has_capacity() function, >group_is_overloaded() will first judge the following >formula, if it holds, the group_classify() will directly >return the

[PATCH] sched/core: add unlikely in group_has_capacity()

2020-07-30 Thread Qi Zheng
1. The group_has_capacity() function is only called in group_classify(). 2. Before calling the group_has_capacity() function, group_is_overloaded() will first judge the following formula, if it holds, the group_classify() will directly return the group_overloaded.