Hi Patrick,
With your new fix patch, you define
perf_constrain_idx = perf_boost_idx,
As my understanding, it means will permit more performance reduction for PC region with the same energy reduction. For example:
boost = 15, energ_delt = -10.
Previous solution: perf_boost_idx = 1, perf_constrain_index = 9,
For PC region, nrg_gain = 5, cap_gain = 1, then capa_delt * 5 - (-10 x 1) > 0 capa_delt > -2
New solution: perf_boost_idx = 1, perf_constrain_index = 1,
For PC region, nrg_gain = 1, cap_gain = 5, then capa_delt * 1 - (-10 x 5) > 0 capa_delt > -50
so, we can see, for new solution, the accepted capacity delta range is more big.
I don't know whether my understanding is correct, if true, it will cause more performance downgrade? am i right?
On 2016年06月28日 02:47, Patrick Bellasi wrote:
On 27-Jun 21:46, Leo Yan wrote:
On Mon, Jun 27, 2016 at 01:42:48PM +0100, Patrick Bellasi wrote:
[...]
For more easily to demonstrate my idea, please see the plot I draw for the PE filter region:
https://people.linaro.org/~leo.yan/PE_Filter_Regions.png
For boost=0, means PE filter region is left cut of X axis. If boost=5, then that means the cut gradient will rotate to right then will enable part of PB region and remove some of PC region. If boost=100, that means the cut gradient finally rotate to horizontal level and will totally enable PB region and remove whole PC region.
That's exactly the original idea based on which the PE regions cuts should work. Thanks for sharing these plots, they are quite useful. I would like to add something similar in LISA...
Glad for alignment. I have shared ipynb file in: https://people.linaro.org/~leo.yan/Payoff_PE_Filter_Regions.ipynb
Code is not clean and common enough, so just hope it's helpful.
Essentially below table wants to implement this idea properly. So Loose or restrict specific margin is not my purpose, but I want to figure out if can define more ordinary trend for PE filter region.
Not sure updating the table is enough, it's basically "just" increasing the granularity of cuts near the 0% and 100% boost values...
threshold_params should be:
static struct threshold_params threshold_gains[] = { { 1, 5 }, /* >= 0% */
For boost=0 we would have:
/* Performance Boost (B) region threshold params */ perf_boost_idx = sysctl_sched_cfs_boost; perf_boost_idx /= 10;
==> perf_boost_idx = 0 ====> nrg_gain: 1 ====> cap_gain: 5
/* Performance Constraint (C) region threshold params */ perf_constrain_idx = 100 - sysctl_sched_cfs_boost; perf_constrain_idx /= 10;
==> perf_constrain_idx = 10 (overflow) ==> perf_constrain_idx = 9 (once fixed for boundaries checks) ====> nrg_gain: 5 ====> cap_gain: 0
Thus, for example, a scheduling candidate which corresponds to a 50% decrease in both energy and capacity would return:
__schedtune_accept_deltas(int nrg_delta, int cap_delta, int perf_boost_idx, int perf_constrain_idx)
gain_idx = perf_constrain_idx ==> 9 payoff = cap_delta * threshold_gains[gain_idx].nrg_gain; ==> -50 * 5 payoff -= nrg_delta * threshold_gains[gain_idx].cap_gain; ==> -250 - (-50 * 0)
==> payoff: -250 ==> REJECT
And that is wrong, because we would expect to accept a candidate which reduces energy by 50%, regardless of the 50% impact on performances.
I think that the current solution can have some bad impacts both on lower boost values, by forbidding to spread tasks, as well as on higher boost values, by allowing to save small amount of energy wile impacting a lot performances.
How about below code:
I'm working on something quite similar but different... reviewing that code patch I think there are other issues as well.
For example, I think we are not updating the threshold indexes in case of CGroup support. Please find in attachment a series which fixes these issue, if you can give it a review and test it will be appreciated ;-)
Cheers Patrick
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.