From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753044AbbGXPDP (ORCPT ); Fri, 24 Jul 2015 11:03:15 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:39164 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752563AbbGXPDM (ORCPT ); Fri, 24 Jul 2015 11:03:12 -0400 Date: Fri, 24 Jul 2015 17:03:01 +0200 From: Peter Zijlstra To: Adrian Hunter Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Andy Lutomirski , Thomas Gleixner , linux-kernel@vger.kernel.org, Stephane Eranian , Andi Kleen Subject: Re: [PATCH RFC] perf: x86: Improve accuracy of perf/sched clock Message-ID: <20150724150301.GJ19282@twins.programming.kicks-ass.net> References: <1437745195-28219-1-git-send-email-adrian.hunter@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437745195-28219-1-git-send-email-adrian.hunter@intel.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 24, 2015 at 04:39:55PM +0300, Adrian Hunter wrote: > @@ -251,17 +253,17 @@ static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu) > rdtscll(tsc_now); > ns_now = cycles_2_ns(tsc_now); > > - /* > - * Compute a new multiplier as per the above comment and ensure our > - * time function is continuous; see the comment near struct > - * cyc2ns_data. > - */ I'd leave this comment, but update the one this refers to; esp. the bit that explains why 10. Also, I think you can remove the definition of CYC2NS_SCALE_FACTOR. Other than that, seems like a good idea.