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]
Message-ID: <CAKfTPtD8315c8o2354SoRLvUg2OEwjsuE2uwO+LKu=aT_EhELQ@mail.gmail.com>
Date:	Wed, 13 Jun 2012 11:22:56 +0200
From:	Vincent Guittot <vincent.guittot@...aro.org>
To:	Jean Pihet <jean.pihet@...oldbits.com>
Cc:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linaro-dev@...ts.linaro.org, devicetree-discuss@...ts.ozlabs.org,
	linux@....linux.org.uk, peterz@...radead.org,
	grant.likely@...retlab.ca, rob.herring@...xeda.com
Subject: Re: [RFC 1/4] ARM: topology: Add arch_scale_freq_power function

On 13 June 2012 10:50, Jean Pihet <jean.pihet@...oldbits.com> wrote:
> Hi Vincent,
>
> On Tue, Jun 12, 2012 at 2:02 PM, Vincent Guittot
> <vincent.guittot@...aro.org> wrote:
>> Add infrastructure to be able to modify the cpu_power of each core
>>
>> Signed-off-by: Vincent Guittot <vincent.guittot@...aro.org>
>> ---
>>  arch/arm/include/asm/topology.h |    2 ++
>>  arch/arm/kernel/topology.c      |   36 +++++++++++++++++++++++++++++++++++-
>>  2 files changed, 37 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/include/asm/topology.h b/arch/arm/include/asm/topology.h
>> index 58b8b84..78e4c85 100644
>> --- a/arch/arm/include/asm/topology.h
>> +++ b/arch/arm/include/asm/topology.h
>> @@ -27,11 +27,13 @@ void init_cpu_topology(void);
>>  void store_cpu_topology(unsigned int cpuid);
>>  const struct cpumask *cpu_coregroup_mask(int cpu);
>>
>> +void set_power_scale(unsigned int cpu, unsigned long power);
>>  #else
>>
>>  static inline void init_cpu_topology(void) { }
>>  static inline void store_cpu_topology(unsigned int cpuid) { }
>>
>> +static inline void set_power_scale(unsigned int cpu, unsigned long power) { }
>>  #endif
>>
>>  #include <asm-generic/topology.h>
>> diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
>> index 8200dea..00301a7 100644
>> --- a/arch/arm/kernel/topology.c
>> +++ b/arch/arm/kernel/topology.c
>> @@ -22,6 +22,35 @@
>>  #include <asm/cputype.h>
>>  #include <asm/topology.h>
>>
>> +/*
>> + * cpu power scale management
>> + */
>> +
>> +/*
>> + * cpu power table
>> + * This per cpu data structure describes the relative capacity of each core.
>> + * On a heteregenous system, cores don't have the same computation capacity
>> + * and we reflect that difference in the cpu_power field so the scheduler can
>> + * take this difference into account for load balance. A per cpu structure is
>> + * preferred because each cpu is mainly using its own cpu_power even it's not
>> + * always true because of nohz_idle_balance
> The end of the comment is unclear IMO; Can you give more details on
> the relation between cpu_power and nohz_idle_balance?

When several cores are idle, one core runs the load balance for all
idle cores. The update of the cpu_power can be done during rebalance
and arch_scale_freq_power can be called by CPU0 for updating the
cpu_power of CPU1.

I was probably not clear enough in my first explanation. I will reword
the comment

Regards,
Vincent
>
> Regards,
> Jean
--
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