From: kernellwp@gmail.com (Wanpeng Li)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 6/7] sched: replace capacity_factor by usage
Date: Sun, 23 Nov 2014 09:03:16 +0800 [thread overview]
Message-ID: <54713254.9020601@gmail.com> (raw)
In-Reply-To: <CAKfTPtCX687FkGgxLO7spfGvDxhDWeFDERLRZ-NakO2Jrpmnhw@mail.gmail.com>
Hi Vincent,
On 10/9/14, 10:18 PM, Vincent Guittot wrote:
> On 9 October 2014 14:16, Peter Zijlstra <peterz@infradead.org> wrote:
>> On Tue, Oct 07, 2014 at 02:13:36PM +0200, Vincent Guittot wrote:
>>> +static inline bool
>>> +group_has_capacity(struct lb_env *env, struct sg_lb_stats *sgs)
>>> {
>>> + if ((sgs->group_capacity * 100) >
>>> + (sgs->group_usage * env->sd->imbalance_pct))
>>> + return true;
>> Why the imb_pct there? We're looking for 100% utilization, not 130 or
>> whatnot, right?
> Having exactly 100% is quite difficult because of various rounding.
Could you give some examples about the various rounding?
Regards,
Wanpeng Li
> So i have added a margin/threshold to prevent any excessive change of the state.
> I have just to use the same margin/threshold than in other place in
> load balance.
>
> so the current threshold depends of the sched_level. it's around 14% at MC level
>
>>> + if (sgs->sum_nr_running < sgs->group_weight)
>>> + return true;
>> With the code as it stands, this is the cheaper test (no mults) so why
>> is it second?
>>
>>> + return false;
>>> +}
>>>
>>> +static inline bool
>>> +group_is_overloaded(struct lb_env *env, struct sg_lb_stats *sgs)
>>> +{
>>> + if (sgs->sum_nr_running <= sgs->group_weight)
>>> + return false;
>>> +
>>> + if ((sgs->group_capacity * 100) <
>>> + (sgs->group_usage * env->sd->imbalance_pct))
>>> + return true;
>>>
>>> + return false;
>>> }
>> Same thing here wrt imb_pct
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
WARNING: multiple messages have this Message-ID (diff)
From: Wanpeng Li <kernellwp@gmail.com>
To: Vincent Guittot <vincent.guittot@linaro.org>,
Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Preeti U Murthy <preeti@linux.vnet.ibm.com>,
Morten Rasmussen <Morten.Rasmussen@arm.com>,
Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
LAK <linux-arm-kernel@lists.infradead.org>,
Rik van Riel <riel@redhat.com>, Mike Galbraith <efault@gmx.de>,
Nicolas Pitre <nicolas.pitre@linaro.org>,
"linaro-kernel@lists.linaro.org" <linaro-kernel@lists.linaro.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Paul Turner <pjt@google.com>,
Benjamin Segall <bsegall@google.com>
Subject: Re: [PATCH v7 6/7] sched: replace capacity_factor by usage
Date: Sun, 23 Nov 2014 09:03:16 +0800 [thread overview]
Message-ID: <54713254.9020601@gmail.com> (raw)
In-Reply-To: <CAKfTPtCX687FkGgxLO7spfGvDxhDWeFDERLRZ-NakO2Jrpmnhw@mail.gmail.com>
Hi Vincent,
On 10/9/14, 10:18 PM, Vincent Guittot wrote:
> On 9 October 2014 14:16, Peter Zijlstra <peterz@infradead.org> wrote:
>> On Tue, Oct 07, 2014 at 02:13:36PM +0200, Vincent Guittot wrote:
>>> +static inline bool
>>> +group_has_capacity(struct lb_env *env, struct sg_lb_stats *sgs)
>>> {
>>> + if ((sgs->group_capacity * 100) >
>>> + (sgs->group_usage * env->sd->imbalance_pct))
>>> + return true;
>> Why the imb_pct there? We're looking for 100% utilization, not 130 or
>> whatnot, right?
> Having exactly 100% is quite difficult because of various rounding.
Could you give some examples about the various rounding?
Regards,
Wanpeng Li
> So i have added a margin/threshold to prevent any excessive change of the state.
> I have just to use the same margin/threshold than in other place in
> load balance.
>
> so the current threshold depends of the sched_level. it's around 14% at MC level
>
>>> + if (sgs->sum_nr_running < sgs->group_weight)
>>> + return true;
>> With the code as it stands, this is the cheaper test (no mults) so why
>> is it second?
>>
>>> + return false;
>>> +}
>>>
>>> +static inline bool
>>> +group_is_overloaded(struct lb_env *env, struct sg_lb_stats *sgs)
>>> +{
>>> + if (sgs->sum_nr_running <= sgs->group_weight)
>>> + return false;
>>> +
>>> + if ((sgs->group_capacity * 100) <
>>> + (sgs->group_usage * env->sd->imbalance_pct))
>>> + return true;
>>>
>>> + return false;
>>> }
>> Same thing here wrt imb_pct
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2014-11-23 1:03 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 12:13 [PATCH v7 0/7] sched: consolidation of cpu_capacity Vincent Guittot
2014-10-07 12:13 ` Vincent Guittot
2014-10-07 12:13 ` [PATCH v7 1/7] sched: add per rq cpu_capacity_orig Vincent Guittot
2014-10-07 12:13 ` Vincent Guittot
2014-10-07 12:13 ` [PATCH v7 2/7] sched: move cfs task on a CPU with higher capacity Vincent Guittot
2014-10-07 12:13 ` Vincent Guittot
2014-10-09 11:23 ` Peter Zijlstra
2014-10-09 11:23 ` Peter Zijlstra
2014-10-09 14:59 ` Vincent Guittot
2014-10-09 14:59 ` Vincent Guittot
2014-10-09 15:30 ` Peter Zijlstra
2014-10-09 15:30 ` Peter Zijlstra
2014-10-10 7:46 ` Vincent Guittot
2014-10-10 7:46 ` Vincent Guittot
2014-10-07 12:13 ` [PATCH v7 3/7] sched: add utilization_avg_contrib Vincent Guittot
2014-10-07 12:13 ` Vincent Guittot
2014-10-08 17:04 ` Dietmar Eggemann
2014-10-08 17:04 ` Dietmar Eggemann
2014-10-07 12:13 ` [PATCH 4/7] sched: Track group sched_entity usage contributions Vincent Guittot
2014-10-07 12:13 ` Vincent Guittot
2014-10-07 20:15 ` bsegall at google.com
2014-10-07 20:15 ` bsegall
2014-10-08 7:16 ` Vincent Guittot
2014-10-08 7:16 ` Vincent Guittot
2014-10-08 11:13 ` Morten Rasmussen
2014-10-08 11:13 ` Morten Rasmussen
2014-10-07 12:13 ` [PATCH v7 5/7] sched: get CPU's usage statistic Vincent Guittot
2014-10-07 12:13 ` Vincent Guittot
2014-10-09 11:36 ` Peter Zijlstra
2014-10-09 11:36 ` Peter Zijlstra
2014-10-09 13:57 ` Vincent Guittot
2014-10-09 13:57 ` Vincent Guittot
2014-10-09 15:12 ` Peter Zijlstra
2014-10-09 15:12 ` Peter Zijlstra
2014-10-10 14:38 ` Vincent Guittot
2014-10-10 14:38 ` Vincent Guittot
2014-10-07 12:13 ` [PATCH v7 6/7] sched: replace capacity_factor by usage Vincent Guittot
2014-10-07 12:13 ` Vincent Guittot
2014-10-09 12:16 ` Peter Zijlstra
2014-10-09 12:16 ` Peter Zijlstra
2014-10-09 14:18 ` Vincent Guittot
2014-10-09 14:18 ` Vincent Guittot
2014-10-09 15:18 ` Peter Zijlstra
2014-10-09 15:18 ` Peter Zijlstra
2014-10-10 7:17 ` Vincent Guittot
2014-10-10 7:17 ` Vincent Guittot
2014-10-10 7:18 ` Vincent Guittot
2014-10-10 7:18 ` Vincent Guittot
2014-11-23 1:03 ` Wanpeng Li [this message]
2014-11-23 1:03 ` Wanpeng Li
2014-11-24 10:16 ` Vincent Guittot
2014-11-24 10:16 ` Vincent Guittot
2014-10-09 14:16 ` Peter Zijlstra
2014-10-09 14:16 ` Peter Zijlstra
2014-10-09 14:28 ` Vincent Guittot
2014-10-09 14:28 ` Vincent Guittot
2014-10-09 14:58 ` Peter Zijlstra
2014-10-09 14:58 ` Peter Zijlstra
2014-10-21 7:38 ` Vincent Guittot
2014-10-21 7:38 ` Vincent Guittot
2014-10-07 12:13 ` [PATCH v7 7/7] sched: add SD_PREFER_SIBLING for SMT level Vincent Guittot
2014-10-07 12:13 ` Vincent Guittot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54713254.9020601@gmail.com \
--to=kernellwp@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.