lkml.org 
[lkml]   [2015]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFCv4 PATCH 22/34] sched: Calculate energy consumption of sched_group
* Morten Rasmussen <morten.rasmussen@arm.com> [2015-05-12 20:38:57]:

[...]
> +/*
> + * cpu_norm_usage() returns the cpu usage relative to a specific capacity,
> + * i.e. it's busy ratio, in the range [0..SCHED_LOAD_SCALE] which is useful for
> + * energy calculations. Using the scale-invariant usage returned by
> + * get_cpu_usage() and approximating scale-invariant usage by:
> + *
> + * usage ~ (curr_freq/max_freq)*1024 * capacity_orig/1024 * running_time/time
> + *
> + * the normalized usage can be found using the specific capacity.
> + *
> + * capacity = capacity_orig * curr_freq/max_freq
> + *
> + * norm_usage = running_time/time ~ usage/capacity
> + */
> +static unsigned long cpu_norm_usage(int cpu, unsigned long capacity)
> +{
> + int usage = __get_cpu_usage(cpu);

__get_cpu_usage is introduced in next patch "sched: Extend sched_group_energy
to test load-balancing decisions", applying the series with this patch as top
most patch breaks the build.

kernel/sched/fair.c: In function ‘cpu_norm_usage’:
kernel/sched/fair.c:4830:2: error: implicit declaration of function ‘__get_cpu_usage’ [-Werror=implicit-function-declaration]
int usage = __get_cpu_usage(cpu);
^

Given that __get_cpu_usage(), take additional parameter - delta. get_cpu_usage()
should have been used here.

Thanks,
Kamalesh



\
 
 \ /
  Last update: 2015-05-21 10:21    [W:0.232 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site