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>] [day] [month] [year] [list]
Message-ID: <55428FEB.2050307@arm.com>
Date:	Thu, 30 Apr 2015 21:26:19 +0100
From:	Dietmar Eggemann <dietmar.eggemann@....com>
To:	"pang.xunlei@....com.cn" <pang.xunlei@....com.cn>,
	Morten Rasmussen <Morten.Rasmussen@....com>
CC:	Juri Lelli <Juri.Lelli@....com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-kernel-owner@...r.kernel.org" 
	<linux-kernel-owner@...r.kernel.org>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"mturquette@...aro.org" <mturquette@...aro.org>,
	"nico@...aro.org" <nico@...aro.org>,
	"peterz@...radead.org" <peterz@...radead.org>,
	"preeti@...ux.vnet.ibm.com" <preeti@...ux.vnet.ibm.com>,
	"rjw@...ysocki.net" <rjw@...ysocki.net>,
	"vincent.guittot@...aro.org" <vincent.guittot@...aro.org>,
	"yuyang.du@...el.com" <yuyang.du@...el.com>
Subject: Re: [RFCv3 PATCH 31/48] sched: Extend sched_group_energy to test
 load-balancing decisions

On 30/04/15 08:00, pang.xunlei@....com.cn wrote:
> linux-kernel-owner@...r.kernel.org wrote 2015-02-05 AM 02:31:08:

[...]

>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index d12aa63..07c84af 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -4592,23 +4592,44 @@ static unsigned long capacity_curr_of(int cpu)
>>   * Without capping the usage, a group could be seen as overloaded
> (CPU0 usage
>>   * at 121% + CPU1 usage at 80%) whereas CPU1 has 20% of available
> capacity/
>>   */
>> -static int get_cpu_usage(int cpu)
>> +static int __get_cpu_usage(int cpu, int delta)
>>  {
>> +   int sum;
>>     unsigned long usage = cpu_rq(cpu)->cfs.utilization_load_avg;
>>     unsigned long blocked = cpu_rq(cpu)->cfs.utilization_blocked_avg;
>>     unsigned long capacity_curr = capacity_curr_of(cpu);
>>  
>> -   if (usage + blocked >= capacity_curr)
>> +   sum = usage + blocked + delta;
>> +
>> +   if (sum < 0)
>> +      return 0;
>> +
>> +   if (sum >= capacity_curr)
>>        return capacity_curr;
> 
> So if the added delta exceeds the curr capacity not its orignal capacity
> which I think would be quite often cases, I guess it should be better if
> it's allowed to increase its freq and calculate the right energy diff.

Yes, I mentioned this in my answer for [RFCv3 PATCH 17/48] that our
testing in the meantime has shown that this capping by capacity_curr is
the wrong approach in some cases and that we are likely to change this
to capacity_orig_of(cpu) in the next version.

[...]

--
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