From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751292AbbEFPxr (ORCPT ); Wed, 6 May 2015 11:53:47 -0400 Received: from mail.skyhub.de ([78.46.96.112]:45570 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750826AbbEFPxo (ORCPT ); Wed, 6 May 2015 11:53:44 -0400 Date: Wed, 6 May 2015 17:53:38 +0200 From: Borislav Petkov To: Ingo Molnar , Andy Lutomirski Cc: Fenghua Yu , Thomas Gleixner , Dave Hansen , Linus Torvalds , Oleg Nesterov , "H. Peter Anvin" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 207/208] x86/fpu: Add FPU performance measurement subsystem Message-ID: <20150506155338.GF22949@pd.tnic> References: <1430848712-28064-1-git-send-email-mingo@kernel.org> <1430848712-28064-47-git-send-email-mingo@kernel.org> <20150506045239.GA12393@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150506045239.GA12393@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 06, 2015 at 06:52:39AM +0200, Ingo Molnar wrote: > > Can you change "cycles" to "TSC ticks"? They're not quite the same thing. > > Yeah, with constant TSC we have the magic TSC frequency that is used > by RDTSC. > > I'm torn: 'TSC ticks' will mean very little to most people reading > that output. We could convert it to nsecs with a little bit of > calibration - but that makes it depend on small differences in CPU > model frequencies, while the (cached) cycle costs are typically > constant per microarchitecture. I think the best we should do is convert the TSC ticks to the unboosted P0 frequency, i.e. if the P0 freq is say, 4GHz, we have 4*10^9 core cycles per second. And then convert the counted TSC ticks to those cycles. For that we would need to measure in the beginning how TSC ticks relate to P0 cycles and then use that number for conversion... Hmmm. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --