From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753595AbbIIIcw (ORCPT ); Wed, 9 Sep 2015 04:32:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46290 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753349AbbIIIcp (ORCPT ); Wed, 9 Sep 2015 04:32:45 -0400 Date: Wed, 9 Sep 2015 10:32:43 +0200 From: Miroslav Lichvar To: John Stultz Cc: LKML , Nuno =?iso-8859-1?Q?Gon=E7alves?= , Prarit Bhargava , Richard Cochran , Ingo Molnar , Thomas Gleixner , Shuah Khan Subject: Re: [PATCH 2/2][RFC] kselftest: timers: Add adjtick test to validate adjtimex() tick adjustments Message-ID: <20150909083243.GN24711@localhost> References: <1441778226-16538-1-git-send-email-john.stultz@linaro.org> <1441778226-16538-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: <1441778226-16538-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 On Tue, Sep 08, 2015 at 10:57:06PM -0700, John Stultz wrote: > Recently an issue was reported that was difficult to detect except > by tweaking the adjtimex tick value, and noticing how quickly the > adjustment took to be made: > https://lkml.org/lkml/2015/9/1/488 > > Thus this patch introduces a new test which manipulates the adjtimex > tick value and validates the results are what we expect. Great! > + ppm = ((long long)tickval * MILLION)/10000 - MILLION; I think this needs to be based on sysconf(_SC_CLK_TCK) or similar, since the user-space HZ is not 100 on all archs. > + for (tick = 9000; tick < 11000; tick += 250) > + if (check_tick_adj(tick)) { This too. > + tx1.tick = 10000; > + adjtimex(&tx1); And this too. -- Miroslav Lichvar