From: Tim Chen <tim.c.chen@linux.intel.com>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
dvhart@infradead.org, andriy.shevchenko@intel.com
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non HWP systems
Date: Wed, 18 Jan 2017 14:40:50 -0800 [thread overview]
Message-ID: <1484779250.2833.34.camel@linux.intel.com> (raw)
In-Reply-To: <1484764155-183890-1-git-send-email-srinivas.pandruvada@linux.intel.com>
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;
> +}
> +
next prev parent reply other threads:[~2017-01-18 22:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-18 18:29 [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non HWP systems Srinivas Pandruvada
2017-01-18 19:15 ` Andy Shevchenko
2017-01-18 20:36 ` Darren Hart
2017-01-18 22:40 ` Tim Chen [this message]
2017-01-19 10:38 ` Andy Shevchenko
2017-01-19 19:43 ` Tim Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1484779250.2833.34.camel@linux.intel.com \
--to=tim.c.chen@linux.intel.com \
--cc=andriy.shevchenko@intel.com \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.