On 23-Sep 10:58, Leo Yan wrote:
Hi Patrick,
Hi Leo, here are some comments to be further discussed in the tomorrow's hacking session.
This patch mainly have two purpose.
The first one purpose is to adjust the range for capacity index so let capacity index and energy index have similiar range between each other. This helps task to fall into more reasonable PE filter region. So this is finished by patch 1.
Do we have some PESpace plots to compare the filter behaviors pre and post this patch?
The second purpose is to support negative boosting value in PE filter, so schedTune has integrity of algorithm which can support both for positive and negative boosting values.
That's right, so fare we use negative boosting only for OPP biasing but not for CPU biasing. But let start by defining what is the goal we are after. Do we want to use negative boosting to somehow bias the selection of a little CPU also for a big task?
As we know, if we set boost value as positive value, then the PE filter region will rotate to right side so give more chance for (PB) region and reduce chance for (PC) region, so finally we can get filter region as below:
^ (O) | / (PB) | / | / | / `-> cut |/ --------------------------> /| / | / | / | / | (PC) | (SO)
On the other than, if set boosting as negative value, then it should rotate the PE filter region to left side, so we can get filter region as below. This is finished by patch 0002~0006.
^ (O) \ | (PB) \ | \ | \ | \| --------------------------> |\ | \ | \ | \ | \ (PC) | \ (SO)
If I understand it correctly this means that the more we negative boost a task the more we are willing to accept scheduling candidates which are part of the Suboptimal region. Is that right?
IMO we should always avoid SO candidates, because we know that for these scheduling candidates we will spend more energy for lower performances.
I have also some doubts about the filtering related to the Optional region. Why we would like to avoid to get better performances while also saving energy?
Provided that we want to bias CPU selection for negative boosted tasks (it that is our goal) I'm wondering if we cannot do that by exploiting this information in the energy_aware_wake_cpu, even before getting to the energy_diff and accept_deltas.
Patch 0007 is used to verify PE filter table with LISA. I did some testing on Hikey for TraceAnalysis::plotEDiffSpace() for PE filtering and TraceAnalysis::plotTasks() for boosting signals; have passed these testing.
Would be nice to review these data tomorrow.
v2 -> v1:
- Refine for patch 0001 to discount cap_delta in function energy_diff();
- Fix bug and typo in patch 0003;
- Refine patch 0004, so open optimal and sub-optimal regions checkin; when disabled configuration CONFIG_CGROUP_SCHEDTUNE;
- Add patch 0006 to support negative value for sysctl_sched_cfs_boost;
- Add patch 0007 to trace energy_diff properly.
Leo Yan (7): sched/fair: discount capacity index for PE filter sched/tune: minor fix for gain table sched/tune: polish for PE gain table index sched/tune: open optimal and sub-optimal regions for checking sched/tune: add PE filter support for negative boosting sched/tune: let sysctl_sched_cfs_boost support negative value DEBUG: sched/tune: move energy_diff trace point
include/linux/sched/sysctl.h | 6 +-- kernel/sched/fair.c | 29 +++++++--- kernel/sched/tune.c | 124 +++++++++++++++++-------------------------- kernel/sysctl.c | 5 +- 4 files changed, 76 insertions(+), 88 deletions(-)
-- 1.9.1
-- #include <best/regards.h>
Patrick Bellasi