Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756133AbaDHFex (ORCPT ); Tue, 8 Apr 2014 01:34:53 -0400 Received: from mail-oa0-f43.google.com ([209.85.219.43]:63398 "EHLO mail-oa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750718AbaDHFew (ORCPT ); Tue, 8 Apr 2014 01:34:52 -0400 MIME-Version: 1.0 In-Reply-To: <0214020@agluck-desk.sc.intel.com> References: <0214020@agluck-desk.sc.intel.com> Date: Mon, 7 Apr 2014 22:34:51 -0700 Message-ID: Subject: Re: [RFC PATCH] time: Fix truncation in jiffies_to_usecs() From: Tony Luck To: Linux Kernel Mailing List Cc: Steven Rostedt , Frederic Weisbecker , Ingo Molnar , Mauro Chehab Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 7, 2014 at 3:25 PM, Tony Luck wrote: > c) If not this ... then what? Separate routine to convert large numbers > of jiffies to usec/nsecs? Should we make the existing one barf when > handed a number that overflows? Having thought about this a bit more - I'm leaning towards leaving jiffies_to_usecs() alone, but using it as a model for a from-scratch implementation of: u64 jiffies_to_nsecs(const unsigned long j) { } This is what the uptime tracer actually needs - and there is only one user of jiffies_to_nsecs() to worry about. -Tony -- 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/