lkml.org 
[lkml]   [2009]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 2 1/2] sched: Nominate idle load balancer from a semi-idle package.
Gautham R Shenoy wrote:
> kernel/sched.c | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
> 1 files changed, 118 insertions(+), 9 deletions(-)
>
> diff --git a/kernel/sched.c b/kernel/sched.c
> index 6cc1fd5..d702be7 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
>
> +/**
> + * is_semi_idle_group - Checks if the given sched_group is semi-idle.
> + * @ilb_group: group to be checked for semi-idleness
> + *
> + * Returns: 1 if the group is semi-idle. 0 otherwise.
> + *
> + * We define a sched_group to be semi idle if it has atleast one idle-CPU
> + * and atleast one non-idle CPU. This helper function checks if the given

"at least" (2x)

> + * sched_group is semi-idle or not.
> + */
> +static inline int is_semi_idle_group(struct sched_group *ilb_group)
> +{
> + cpumask_and(nohz.ilb_grp_nohz_mask, nohz.cpu_mask,
> + sched_group_cpus(ilb_group));
> +
> + /*
> + * A sched_group is semi-idle when it has atleast one busy cpu
> + * and atleast one idle cpu.

"at least" (2x)

> + */
> + if (cpumask_empty(nohz.ilb_grp_nohz_mask))
> + return 0;
> +
> + if (cpumask_equal(nohz.ilb_grp_nohz_mask, sched_group_cpus(ilb_group)))
> + return 0;
> +
> + return 1;
> +}


--
~Randy


\
 
 \ /
  Last update: 2009-04-14 19:35    [W:0.902 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site