From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755795AbXLQN1n (ORCPT ); Mon, 17 Dec 2007 08:27:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760336AbXLQN11 (ORCPT ); Mon, 17 Dec 2007 08:27:27 -0500 Received: from py-out-1112.google.com ([64.233.166.179]:37246 "EHLO py-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760215AbXLQN1Z (ORCPT ); Mon, 17 Dec 2007 08:27:25 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=DSyI/9Ocfd1pYDZCTAlaAeR/b3L6kygQ08FjZtK0evIZxVwIlNnV7kOM8omda3TyX867m8A5FdAKrcyGAMRZ1VJfyovK4dhoViCjeR9zWow3pfV50aedIjdTw375/6y0nqCyjiIFmLyNr1PVAM+ypBX5Slimg3OtArAwtJNT41Q= Message-ID: Date: Mon, 17 Dec 2007 14:27:23 +0100 From: "Michael Kerrisk" To: "Davide Libenzi" Subject: Re: Tesing of / bugs in new timerfd API Cc: "Andrew Morton" , lkml , tytso@thunk.org, "Thomas Gleixner" , "Greg KH" , "Christoph Hellwig" , "Linux Torvalds" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47614369.3060906@gmail.com> <4762683D.8050007@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Davide, On 12/16/07, Davide Libenzi wrote: > On Fri, 14 Dec 2007, Michael Kerrisk wrote: > > > You snipped my example that demonstrated the problem. Both of the > > following runs create a timer that expires 10 seconds from "now", but > > observe the difference in the value returned by timerfd_gettime(): > > > > $ ./timerfd_test 10 # does not use TFD_TIMER_ABSTIME > > Initial setting for settime: value=10.000, interval=0.000 > > ./timerfd_test> g > > (elapsed time= 1) > > Current value: value=346.448, interval=0.000 > > > > $ ./timerfd_test -a 10 # uses TFD_TIMER_ABSTIME > > Initial setting for settime: value=1197630855.254, interval=0.000 > > ./timerfd_test> g > > (elapsed time= 1) > > Current value: value=1197630855.254, interval=0.000 > > > > Either there's an inconsistency here depending on the use of > > TFD_TIMER_ABSTIME, or there is a bug in my understanding or my test > program > > (but so far I haven't spotted that bug ;-).). > > Can you try the two patches below? I tried them on my 32 bit box (one of > the rare beasts still lingering around here) and it seems to be working > fine (those go on top of the previous ones). Against 2.6.24-rc5, I applied first your earlier patches ("v3") and then the newest patch. My tests confirm that: > This fixed the 32 bit tick-count truncation, and makes the time returned > to be the remaining time till the next expiration. Are you going to resubmit a new patch set that includes these latest changes? Michael