lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 4 Nov 2014 12:10:37 +0100
From:	Vincent Guittot <vincent.guittot@...aro.org>
To:	Wanpeng Li <kernellwp@...il.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Preeti U Murthy <preeti@...ux.vnet.ibm.com>,
	Morten Rasmussen <Morten.Rasmussen@....com>,
	Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>,
	Russell King - ARM Linux <linux@....linux.org.uk>,
	LAK <linux-arm-kernel@...ts.infradead.org>,
	Rik van Riel <riel@...hat.com>,
	Mike Galbraith <efault@....de>,
	Nicolas Pitre <nicolas.pitre@...aro.org>,
	"linaro-kernel@...ts.linaro.org" <linaro-kernel@...ts.linaro.org>
Subject: Re: [PATCH v8 03/10] sched: move cfs task on a CPU with higher capacity

On 4 November 2014 11:42, Wanpeng Li <kernellwp@...il.com> wrote:
> Hi Vincent,
>
>>>> +
>>>> +/*
>>>>     * Group imbalance indicates (and tries to solve) the problem where
>>>> balancing
>>>>     * groups is inadequate due to tsk_cpus_allowed() constraints.
>>>>     *
>>>> @@ -6562,6 +6574,28 @@ static int need_active_balance(struct lb_env
>>>> *env)
>>>>                          return 1;
>>>>          }
>>>>    +     /*
>>>> +        * The dst_cpu is idle and the src_cpu CPU has only 1 CFS task.
>>>
>>>
>>> Why specify one task instead of not less than one?
>>
>> if cfs.h_nr_running == 0 (which should not occurs at that point), we
>> don't need to do more test to check if it's worth moving the task
>> because there is no task to move.
>
>
> Sorry for my confusing statement. I mean cfs.h_nr_running >= 1.

ok.

If we have more than 1 task, we fall back into the default balancing
policy than should move a not running task or that will use the
imbalance field in case of the presence of pinned tasks

Regards,
Vincent

>
> Regards,
> Wanpeng Li
>
>
>>
>> Regards,
>> Vincent
>>>
>>> Regards,
>>> Wanpeng Li
>>>
>>>
>>>> +        * It's worth migrating the task if the src_cpu's capacity is
>>>> reduced
>>>> +        * because of other sched_class or IRQs whereas capacity stays
>>>> +        * available on dst_cpu.
>>>> +        */
>>>> +       if ((env->idle != CPU_NOT_IDLE) &&
>>>> +                       (env->src_rq->cfs.h_nr_running == 1)) {
>>>> +               unsigned long src_eff_capacity, dst_eff_capacity;
>>>> +
>>>> +               dst_eff_capacity = 100;
>>>> +               dst_eff_capacity *= capacity_of(env->dst_cpu);
>>>> +               dst_eff_capacity *= capacity_orig_of(env->src_cpu);
>>>> +
>>>> +               src_eff_capacity = sd->imbalance_pct;
>>>> +               src_eff_capacity *= capacity_of(env->src_cpu);
>>>> +               src_eff_capacity *= capacity_orig_of(env->dst_cpu);
>>>> +
>>>> +               if (src_eff_capacity < dst_eff_capacity)
>>>> +                       return 1;
>>>> +       }
>>>> +
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ