From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752098AbcFWQgJ (ORCPT ); Thu, 23 Jun 2016 12:36:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:41996 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752074AbcFWQgG (ORCPT ); Thu, 23 Jun 2016 12:36:06 -0400 Date: Thu, 23 Jun 2016 18:31:42 +0200 From: Cyril Hrubis To: Thomas Gleixner Cc: George Spelvin , arjan@infradead.org, clm@fb.com, edumazet@google.com, fweisbec@gmail.com, lenb@kernel.org, linux-kernel@vger.kernel.org, ltp@lists.linux.it, mingo@kernel.org, paulmck@linux.vnet.ibm.com, peterz@infradead.org, riel@redhat.com, rt@linutronix.de, torvalds@linux-foundation.org, umgwanakikbuti@gmail.com Subject: Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel Message-ID: <20160623163142.GB20808@rei.lan> References: <20160623114759.GA19250@rei.lan> <20160623135803.636.qmail@ns.sciencehorizons.net> <20160623151127.GA20808@rei.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > > That is likely POSIX conformance bug, since POSIX explicitly states that > > sigtimedwait() shall use CLOCK_MONOTONIC to measure the timeout. > > > > "If the Monotonic Clock option is supported, the CLOCK_MONOTONIC clock > > shall be used to measure the time interval specified by the timeout > > argument." > > That's fine because jiffies is a less granular form of CLOCK_MONOTONIC. Looking into POSIX Realtime Clock and Timers it seems to allow that time service based on CLOCK_* clocks to have different resolution if it's less or equal than 20ms and if this fact is documented. If we wanted to be pedantic about this the man page shoud be patched... Also this gives us reasonably safe upper bound on timer expiration to be something as: sleep_time * 1.125 + 20ms Does this sounds reasonable now? -- Cyril Hrubis chrubis@suse.cz