public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
Cc: davej@redhat.com, linux-kernel@vger.kernel.org,
	cpufreq@vger.kernel.org, linux-acpi@vger.kernel.org,
	mjg@redhat.com, trenn@suse.de, lenb@kernel.org
Subject: Re: [PATCH] cpufreq: Processor Clocking Control interface driver
Date: Sat, 12 Dec 2009 00:12:34 +0100	[thread overview]
Message-ID: <20091211231233.GA4291@isilmar.linta.de> (raw)
In-Reply-To: <20091128034424.6796.75673.sendpatchset@localhost.localdomain>

Hey,

On Fri, Dec 11, 2009 at 10:55:40PM +0000, Naga Chumbalkar wrote:
> +The VERSION number for the driver will be of the format v.xy.ab.
> +eg: 1.00.02
> +   ----- --
> +    |    |
> +    |    -- this will increase with bug fixes/enhancements to the driver
> +    |-- this is the version of the PCC specification the driver adheres to

If this is _really_ necessary... Doesn't the driver version relate to some
Linux kernel version anyway?

> +2.1 scaling_available_frequencies:
> +----------------------------------
> +scaling_available_frequencies indicates the minimum and maximum speed
> +the CPU can take as advertised by the BIOS. No intermediate frequencies are
> +listed because the BIOS will try to achieve any intermediate frequency
> +requested by the governor. An intermediate frequency does not have to be
> +strictly associated with a P-state.

Why do you export scaling_available_frequencies anyway? It's made available
by the _optional_ freq-table helper module, which is wrong to use in this
case anyway.

> +2.2 cpuinfo_transition_latency:
> +-------------------------------
> +The cpuinfo_transition_latency field is 0. The PCC specification does
> +not include a field to expose this value currently.

Uh, bad specification... So does it work properly with ondemand and/or
conservative (which read out this field, and if latency=0 use a minimum
value)?

> +config X86_PCC_CPUFREQ
> +	tristate "Processor Clocking Control interface driver"
> +	select CPU_FREQ_TABLE
Uh, see above.

> +static int pcc_cpufreq_verify(struct cpufreq_policy *policy)
> +{
> +	return cpufreq_frequency_table_verify(policy, pcc_freq_table);
> +}

Well, AFAICS, this limits the whole interface to two values: min or max. So
let's allow for any intermediate value:

static int pcc_cpufreq_verify(struct cpufreq_policy *policy)
{
	cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, policy->cpuinfo.max_freq);
}

but well... later on, you check this:

> +	if (target_freq <= (ioread32(&pcch_hdr->minimum_frequency) * 1000)) {
> +		target_freq = ioread32(&pcch_hdr->minimum_frequency) * 1000;
> +		dprintk("target: target_freq for cpu %d was below limit, "
> +			"converted it to %d\n", cpu, target_freq);
> +	}

why not do this in the _verify() step? Does pcch_hdr->minimum_frequency
even change "on the fly"?

So, I'd propose to NACK this patch at the moment.

Best,
	Dominik

  reply	other threads:[~2009-12-11 23:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-11 22:55 [PATCH] cpufreq: Processor Clocking Control interface driver Naga Chumbalkar
2009-12-11 23:12 ` Dominik Brodowski [this message]
2009-12-15 18:08   ` Chumbalkar, Nagananda
2009-12-15 18:33     ` Dominik Brodowski
2009-12-16 15:31       ` Chumbalkar, Nagananda
2009-12-16 16:38         ` Dominik Brodowski

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=20091211231233.GA4291@isilmar.linta.de \
    --to=linux@dominikbrodowski.net \
    --cc=cpufreq@vger.kernel.org \
    --cc=davej@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=nagananda.chumbalkar@hp.com \
    --cc=trenn@suse.de \
    /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