lkml.org 
[lkml]   [2017]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non HWP systems
From
Date
On Wed, 2017-01-18 at 10:29 -0800, Srinivas Pandruvada wrote:

> +
> +static int itmt_legacy_cpu_online(unsigned int cpu)
> +{
> + static u32 max_highest_perf = 0, min_highest_perf = U32_MAX;

Should the max_highest_perf and min_highest_perf be defined and initialized
outside this function?  Otherwise the max and min value will be lost and reset
each time a new cpu comes online.

We will always find max_highest_perf == min_highest_perf.

Tim 

> + int priority;
> +
> + priority = get_oc_core_priority(cpu);
> + if (priority < 0)
> + return 0;
> +
> + sched_set_itmt_core_prio(priority, cpu);
> +
> + /* Enable ITMT feature when a core with different priority is found */
> + if (max_highest_perf <= min_highest_perf) {
> + if (priority > max_highest_perf)
> + max_highest_perf = priority;
> +
> + if (priority < min_highest_perf)
> + min_highest_perf = priority;
> +
> + if (max_highest_perf > min_highest_perf)
> + schedule_work(&sched_itmt_work);
> + }
> +
> + return 0;
> +}
> +

\
 
 \ /
  Last update: 2017-01-18 23:42    [W:0.099 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site