Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1562250

Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non HWP systems

From Tim Chen <tim.c.chen@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non HWP systems
Date 2017-01-18 23:50 +0100
Message-ID <t17dh-1CE-39@gated-at.bofh.it> (permalink)
References <t13sZ-7Dp-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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;
> +}
> +

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non HWP systems Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2017-01-18 19:50 +0100
  Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non HWP systems Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-18 20:20 +0100
  Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non  HWP systems Darren Hart <dvhart@infradead.org> - 2017-01-18 21:50 +0100
  Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non  HWP systems Tim Chen <tim.c.chen@linux.intel.com> - 2017-01-18 23:50 +0100
    Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non  HWP systems Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-19 11:50 +0100
      Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non  HWP systems Tim Chen <tim.c.chen@linux.intel.com> - 2017-01-19 20:50 +0100

csiph-web