From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41])
 by dpdk.org (Postfix) with ESMTP id 492C7137D
 for <dev@dpdk.org>; Wed,  9 Apr 2014 14:22:09 +0200 (CEST)
Received: by mail-wg0-f41.google.com with SMTP id n12so2352272wgh.0
 for <dev@dpdk.org>; Wed, 09 Apr 2014 05:23:46 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:organization
 :user-agent:in-reply-to:references:mime-version
 :content-transfer-encoding:content-type;
 bh=diHXTIW8w0yzOa/OJNSOduw6V4Hn3P1sljdilxibmRY=;
 b=QIkAiZ994+RGpKJ4EZeU9iMx1LZGU3wN1L9hVxFcPNSy9GZUyGsaXcKOgT4NIy6Jmc
 r5DxIu7MTxozvPhL2KW0T62C4AJQEk8aJSW106cqDhDK09DgNrMWl+mYlJ+5h1q+PQ/n
 9FbZPFsbuO9nMs5OD7sheBezHoQmBluU+kTchBEKNXKotNChtQUl9ePXGhQtgtVpwLY8
 VBCDMXCJpI9mKOpoin+1yrFlvNDdvUk85TH4bxqSBWm2/S8yTxC+FGUWlQlKwOa+fRjt
 sibHET3eduhBzZVNqVIQbVxL7Kh0SIN0GBOxiSMq5+PVpEv+2TvpMlvApZMYST3oM/yl
 /Gcg==
X-Gm-Message-State: ALoCoQk8gUMA1D67+HO8VbrcBA3C77msPIAYnrv0V49T7aw7xCkAZ4Tv+iIi4Szk65g9+6mz8t+/
X-Received: by 10.180.188.130 with SMTP id ga2mr37412122wic.18.1397046225847; 
 Wed, 09 Apr 2014 05:23:45 -0700 (PDT)
Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237])
 by mx.google.com with ESMTPSA id or5sm1468965wjc.2.2014.04.09.05.23.44
 for <multiple recipients>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 09 Apr 2014 05:23:45 -0700 (PDT)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 09 Apr 2014 14:23:44 +0200
Message-ID: <1530885.SuHPsB8m1S@xps13>
Organization: 6WIND
User-Agent: KMail/4.12.3 (Linux/3.13.7-1-ARCH; KDE/4.12.3; x86_64; ; )
In-Reply-To: <1396875448-14778-1-git-send-email-bruce.richardson@intel.com>
References: <1396875448-14778-1-git-send-email-bruce.richardson@intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] Revert "timer: get TSC frequency from
	/proc/cpuinfo"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Apr 2014 12:22:09 -0000

2014-04-07 13:57, Bruce Richardson:
> This reverts commit da6fd0759cbeb5fc14991a79e40105b9f6b99059.
> 
> The use of cpuinfo to determine the frequency of the TSC is not
> advisable and leads to incorrect results when power management is
> in use. This is because, while the TSC frequency does not change
> in modern cpus with constant_tsc support, the frequency of the core,
> and hence the frequency of the core reported by cpuinfo *does* change.
> 
> Depending on the current frequency of core 0 when an application is
> started, the EAL can get a wildly incorrect value for the TSC freq.
> Since frequency is scaled down for power saving, any incorrect value
> is likely to be lower than the default, which means that any delay
> loops inside the code which rely on the TSC will be shorter than
> planned. This can cause issues (reported on the mailing list by a number
> of people) where ports are not initialized correctly due to delays being
> too short.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

I agree that using CPU frequency for TSC calibration is wrong with 
constant_tsc support. The goal was to have a precise calibration but the 
result is the reverse because of constant TSC.

Acked and applied.

Thank you Bruce for catching this.
-- 
Thomas