public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: Jacob Shin <jacob.shin@amd.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Viresh Kumar <viresh.kumar@linaro.org>
Subject: Re: [PATCH V2 2/2] cpufreq: AMD "frequency sensitivity feedback" powersave bias for ondemand governor
Date: Tue, 02 Apr 2013 13:40:13 +0200	[thread overview]
Message-ID: <4985234.c9GFoGKqo8@skinner.arch.suse.de> (raw)
In-Reply-To: <1364495057-14939-3-git-send-email-jacob.shin@amd.com>

On Thursday, March 28, 2013 01:24:17 PM Jacob Shin wrote:
> Future AMD processors, starting with Family 16h, can provide software
> with feedback on how the workload may respond to frequency change --
> memory-bound workloads will not benefit from higher frequency, where
> as compute-bound workloads will. This patch enables this "frequency
> sensitivity feedback" to aid the ondemand governor to make better
> frequency change decisions by hooking into the powersave bias.
If I read this correctly, nothing changes even if the driver is loaded,
unless user modifies:
/sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
is this correct?

I wonder who should modify:
/sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
Even cpupower is not aware of this very specific tunable.

Also, are you sure cpufreq subsystem will be the only user
of this one?
Or could cpuidle or others also make use of this somewhen in the future?

Then this could more be done like:
drivers/cpufreq/mperf.c
And scheduler, cpuidle, cpufreq or whatever could use this as well.

Just some thinking:
I wonder how one could check/verify that the right thing is done
(by CPU and kernel). Ideally it would be nice to have the CPU register
appended to a cpufreq or cpuidle event trace.
But this very (AMD or X86 only?) specific data would not look nice there.
An arch placeholder value would be needed or similar?

...
> +}
> +
> +static int __init amd_freq_sensitivity_init(void)
> +{
> +	int i;
> +	u32 eax, edx, dummy;
> +
> +	if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
> +		return -ENODEV;
> +
> +	cpuid(0x80000007, &eax, &dummy, &dummy, &edx);
If this really should be a separate module:
Does/will Intel have the same (feature/cpuid bit)?
Anyway, this should get a general AMD or X86 CPU capability flag.

Then you can also autoload this driver similar to how it's done in acpi-
cpufreq:
static const struct x86_cpu_id acpi_cpufreq_ids[] = {
        X86_FEATURE_MATCH(X86_FEATURE_ACPI),
        X86_FEATURE_MATCH(X86_FEATURE_HW_PSTATE),
        {}
};
MODULE_DEVICE_TABLE(x86cpu, acpi_cpufreq_ids);

       Thomas

  reply	other threads:[~2013-04-02 11:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-28 18:24 [PATCH V2 0/2] cpufreq: ondemand: add AMD specific powersave bias Jacob Shin
2013-03-28 18:24 ` [PATCH V2 1/2] cpufreq: ondemand: allow custom powersave_bias_target function to be registered Jacob Shin
2013-04-02 12:43   ` Borislav Petkov
2013-04-02 14:35     ` Jacob Shin
2013-04-02 13:31   ` Borislav Petkov
2013-03-28 18:24 ` [PATCH V2 2/2] cpufreq: AMD "frequency sensitivity feedback" powersave bias for ondemand governor Jacob Shin
2013-04-02 11:40   ` Thomas Renninger [this message]
2013-04-02 12:49     ` Borislav Petkov
2013-04-02 14:34     ` Jacob Shin
2013-04-02 13:42   ` Borislav Petkov
2013-04-02 17:18     ` Jacob Shin
2013-03-29  2:48 ` [PATCH V2 0/2] cpufreq: ondemand: add AMD specific powersave bias Viresh Kumar
2013-04-01 19:38   ` Jacob Shin
2013-04-01 20:43     ` Rafael J. Wysocki

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=4985234.c9GFoGKqo8@skinner.arch.suse.de \
    --to=trenn@suse.de \
    --cc=cpufreq@vger.kernel.org \
    --cc=jacob.shin@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=viresh.kumar@linaro.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox