[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C456422.7030708@redhat.com>
Date: Tue, 20 Jul 2010 03:53:54 -0500
From: "Avi Kivity" <avi@...hat.com>
To: "Zachary Amsden" <zamsden@...hat.com>
Cc: "KVM" <kvm@...r.kernel.org>,
"Marcelo Tosatti" <mtosatti@...hat.com>,
"Glauber Costa" <glommer@...hat.com>,
"Linux-kernel" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 04/18] Make cpu_tsc_khz updates use local CPU
On 07/19/2010 11:06 PM, Zachary Amsden wrote:
>>> +static void tsc_khz_changed(void *data)
>>> {
>>> - /* nothing */
>>> + struct cpufreq_freqs *freq = data;
>>> + unsigned long khz = 0;
>>> +
>>> + if (data)
>>> + khz = freq->new;
>>> + else if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC))
>>> + khz = cpufreq_quick_get(raw_smp_processor_id());
>>> + if (!khz)
>>> + khz = tsc_khz;
>>> + __get_cpu_var(cpu_tsc_khz) = khz;
>>> }
>>
>> Do we really need to cache cpufreq_quick_get()? If it's really
>> quick, why not just use it everywhere instead of cacheing it? Not a
>> comment on this patch.
>>
>
>
> If cpufreq is compiled in, but disabled, it returns zero, so we need
> some sort of logic.
Maybe it's better to put it into cpufreq_quick_get(). Inconsistent APIs
that appear to work are bad.
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Download attachment "winmail.dat" of type "application/ms-tnef" (2501 bytes)
Powered by blists - more mailing lists