From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756995AbbCGJU3 (ORCPT ); Sat, 7 Mar 2015 04:20:29 -0500 Received: from mail-we0-f177.google.com ([74.125.82.177]:42232 "EHLO mail-we0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756959AbbCGJUZ (ORCPT ); Sat, 7 Mar 2015 04:20:25 -0500 Date: Sat, 7 Mar 2015 10:20:20 +0100 From: Ingo Molnar To: John Stultz Cc: lkml , Dave Jones , Linus Torvalds , Thomas Gleixner , Richard Cochran , Prarit Bhargava , Stephen Boyd , Peter Zijlstra Subject: Re: [PATCH 01/12] clocksource: Simplify clocks_calc_max_nsecs logic Message-ID: <20150307092020.GB30888@gmail.com> References: <1425696603-16878-1-git-send-email-john.stultz@linaro.org> <1425696603-16878-2-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1425696603-16878-2-git-send-email-john.stultz@linaro.org> 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 * John Stultz wrote: > The previous clocks_calc_max_nsecs had some unecessarily > complex bit logic to find the max interval that could cause > multiplication overflows. Since this is not in the hot > path, just do the divide to make it easier to read. > > The previous implementation also had a subtle issue > that it avoided overflows into signed 64bit values, where So here you write the weird '64bit' form, while in the code you write: > + * cyc2ns function without overflowing a 64-bit result. This repeats in later patches as well. I'd suggest using '64-bit' consistently throughout the whole series. > as the intervals are always unsigned. This resulted in > overly conservative intervals, which other saftey margins > were then added to, reducing the intended interval length. Typo. Thanks, Ingo