From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751975AbcFZTA7 (ORCPT ); Sun, 26 Jun 2016 15:00:59 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:42603 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751655AbcFZTA6 (ORCPT ); Sun, 26 Jun 2016 15:00:58 -0400 Date: Sun, 26 Jun 2016 21:00:25 +0200 From: Pavel Machek To: Thomas Gleixner Cc: Mike Galbraith , LKML , Ingo Molnar , Peter Zijlstra , "Paul E. McKenney" , Eric Dumazet , Frederic Weisbecker , Chris Mason , Arjan van de Ven , rt@linutronix.de, Rik van Riel , Linus Torvalds , George Spelvin , Len Brown , ltp@lists.linux.it Subject: Re: [patch V2 00/20] timer: Refactor the timer wheel Message-ID: <20160626190025.GC11162@amd> References: <20160617121134.417319325@linutronix.de> <1466581044.3188.34.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Hi! > > FWIW, testing with ltp, I noticed a new failure in logs. It turns out > > to be intermittent, but the testcase mostly fails. > > You forgot to cc the LTP folks ... > > > rtbox:~ # /usr/local/ltp/conformance/interfaces/sigtimedwait/sigtimedwait_1-1.run-test > > Test FAILED: sigtimedwait() did not return in the required time > > time_elapsed: 1.197057 > > ...come on, you can do it... > > rtbox:~ # /usr/local/ltp/conformance/interfaces/sigtimedwait/sigtimedwait_1-1.run-test > > Test PASSED > > > > #define ERRORMARGIN 0.1 > > ... > > if ((time_elapsed > SIGTIMEDWAITSEC + ERRORMARGIN) > > || (time_elapsed < SIGTIMEDWAITSEC - ERRORMARGIN)) { > > printf("Test FAILED: sigtimedwait() did not return in " > > "the required time\n"); > > printf("time_elapsed: %lf\n", time_elapsed); > > return PTS_FAIL; > > } > > > > Looks hohum to me, but gripe did arrive with patch set, so you get a note. > > hohum is a euphemism. That's completely bogus. > > The only guarantee a syscall with timers has is: timer does not fire > > early. Umm. I'm not sure if you should be designing kernel... I have alarm clock application. It does sleep(60) many times till its time to wake me up. I'll be very angry if sleep(60) takes 65 seconds without some very, very good reason. So yes, man page says this is the only requirement (and did not you break it earlier in the patchset, with sleep for 5 days? :-) ), but no, it is not really the only requirement you have. You may argue LTP's ERRORMARGIN is too strict. But you can't argue LTP is completely bogus, and I'd say error margin of 0.1 second is completely reasonable (*). If I update my alarm clock application to display seconds, I really want them with better precision than 0.1 second (*), because 0.1 seconds is already visible with the naked eye. Best regards, Pavel (*) on reasonably idle system. -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html