lkml.org 
[lkml]   [2016]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2 v2] sched: fix find_idlest_group for fork
On Fri, 25 Nov, at 04:34:32PM, Vincent Guittot wrote:
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index aa47589..820a787 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -5463,13 +5463,19 @@ find_idlest_group(struct sched_domain *sd, struct task_struct *p,
> * utilized systems if we require spare_capacity > task_util(p),
> * so we allow for some task stuffing by using
> * spare_capacity > task_util(p)/2.
> + * spare capacity can't be used for fork because the utilization has
> + * not been set yet as it need to get a rq to init the utilization
> */
> + if (sd_flag & SD_BALANCE_FORK)
> + goto no_spare;
> +
> if (this_spare > task_util(p) / 2 &&
> imbalance*this_spare > 100*most_spare)
> return NULL;
> else if (most_spare > task_util(p) / 2)
> return most_spare_sg;
>
> +no_spare:
> if (!idlest || 100*this_load < imbalance*min_load)
> return NULL;
> return idlest;

It's only a minor comment, but would you be opposed to calling this
label 'skip_spare' to indicate that spare capacity may exist, but
we're not going to make use of it?

\
 
 \ /
  Last update: 2016-11-28 18:02    [W:0.151 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site