From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753936AbbALUiE (ORCPT ); Mon, 12 Jan 2015 15:38:04 -0500 Received: from mail-wi0-f173.google.com ([209.85.212.173]:62094 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753557AbbALUiD (ORCPT ); Mon, 12 Jan 2015 15:38:03 -0500 Date: Mon, 12 Jan 2015 21:37:57 +0100 From: Richard Cochran To: Linus Torvalds Cc: John Stultz , Linux Kernel Mailing List , Dave Jones , Thomas Gleixner , Prarit Bhargava , Stephen Boyd , Ingo Molnar , Peter Zijlstra Subject: Re: [PATCH 06/10] time: Cap clocksource reads to the clocksource max_cycles value Message-ID: <20150112203757.GC4233@localhost.localdomain> References: <1420850068-27828-1-git-send-email-john.stultz@linaro.org> <1420850068-27828-7-git-send-email-john.stultz@linaro.org> <20150111124146.GA15387@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 13, 2015 at 08:02:53AM +1300, Linus Torvalds wrote: > Indeed. It's making things more robust in the face of _known_ issues. > Even with a perfectly designed timer (which we so far have never > seen), interrupts get delayed etc, so trying to stretch it to the > limit of the timer is simply not a good idea. Quite the reverse. So is this patch supposed to fix the case when a tick just missed the range of the clock? Or is this to deal with really broken sources? > More importantly, if the timer is actually any good, the safety margin > won't actually matter, since the timer cycle is so long that 50% of > essentially infinite is still essentially infinite. > > And if the timer isn't very good, then some slop for safety is just > being robust. Here "isn't very good" means that the clock rolls over too frequently. Well, if you cannot be sure to sample the clock in time, then you shouldn't use that clock source at all. Thanks, Richard