lkml.org 
[lkml]   [2014]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC PATCH 08/12 v2] Intercept wakeup/fork/exec load balancing
    Date
    We intercept load balancing to contain the load and load balancing in
    the consolidated CPUs according to our consolidating mechanism.

    In wakeup load balaning, we do not select idle, if the CC of the wakee
    and waker (in this order if SD_WAKE_AFFINE) is capable of handling the
    wakee task. And in fork/exec load balancing when finding the sched_group,
    we find the consolidated group.

    Signed-off-by: Yuyang Du <yuyang.du@intel.com>
    ---
    kernel/sched/fair.c | 15 ++++++++++++++-
    1 file changed, 14 insertions(+), 1 deletion(-)

    diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
    index e7153ff..c7a6347 100644
    --- a/kernel/sched/fair.c
    +++ b/kernel/sched/fair.c
    @@ -4365,9 +4365,16 @@ static int select_idle_sibling(struct task_struct *p, int target)
    struct sched_domain *sd;
    struct sched_group *sg;
    int i = task_cpu(p);
    +#ifdef CONFIG_WORKLOAD_CONSOLIDATION
    + int ret;

    + ret = workload_consolidation_wakeup(i, target);
    + if (ret < nr_cpu_ids)
    + return ret;
    +#else
    if (idle_cpu(target))
    return target;
    +#endif

    /*
    * If the prevous cpu is cache affine and idle, don't be stupid.
    @@ -4460,7 +4467,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
    }

    while (sd) {
    - struct sched_group *group;
    + struct sched_group *group = NULL;
    int weight;

    if (!(sd->flags & sd_flag)) {
    @@ -4468,6 +4475,12 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
    continue;
    }

    +#ifdef CONFIG_WORKLOAD_CONSOLIDATION
    + if (sd->flags & SD_WORKLOAD_CONSOLIDATION)
    + group = workload_consolidation_find_group(sd, p, cpu);
    +
    + if (!group)
    +#endif
    group = find_idlest_group(sd, p, cpu, sd_flag);
    if (!group) {
    sd = sd->child;
    --
    1.7.9.5


    \
     
     \ /
      Last update: 2014-05-12 05:01    [W:3.291 / U:0.736 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site