Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754604AbZI3QSw (ORCPT ); Wed, 30 Sep 2009 12:18:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752953AbZI3QSw (ORCPT ); Wed, 30 Sep 2009 12:18:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51723 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752329AbZI3QSv (ORCPT ); Wed, 30 Sep 2009 12:18:51 -0400 Message-ID: <4AC38467.2060406@redhat.com> Date: Wed, 30 Sep 2009 06:16:39 -1000 From: Zachary Amsden User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3 MIME-Version: 1.0 To: Avi Kivity CC: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Marcelo Tosatti Subject: Re: [PATCH v4: kvm 1/4] Code motion. Separate timer intialization into an indepedent function. References: <4AC1C59F.6010703@redhat.com> <1254260317-3490-1-git-send-email-zamsden@redhat.com> <4AC31AA5.4060609@redhat.com> <4AC37E81.8080104@redhat.com> <4AC37F92.2090502@redhat.com> <4AC3821D.2050900@redhat.com> <4AC38340.4000305@redhat.com> In-Reply-To: <4AC38340.4000305@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1443 Lines: 31 On 09/30/2009 06:11 AM, Avi Kivity wrote: > On 09/30/2009 06:06 PM, Zachary Amsden wrote: >> On 09/30/2009 05:56 AM, Avi Kivity wrote: >>> On 09/30/2009 05:51 PM, Zachary Amsden wrote: >>> >>> If the API allows us to query the tsc frequency, it would simply >>> return the same values in all cases, which we'd ignore. >> >> The API only allows querying the processor frequency. In the >> constant_tsc case, the highest processor frequency is likely going to >> be the actual TSC frequency, but I don't think it's a guarantee; >> theoretically, it could be faster on normal hardware ... or slower on >> overclocked hardware with an externally clocked TSC. > > Well we could add a new API then (or a new tscfreq notifier). Those > conditionals don't belong in client code. It's possible... but it's also possible to run without cpufreq enabled, which won't work properly unless the cpufreq code is aware of the measured tsc_khz... this could be a little ugly architecture wise given the big melting pot of generic code and vendor / arch specific code here. Since we're already very hardware dependent and one of the few clients who care, it seems okay to leave it as is for now. Zach -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/