Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756044Ab0LBBTF (ORCPT ); Wed, 1 Dec 2010 20:19:05 -0500 Received: from mail2.shareable.org ([80.68.89.115]:44514 "EHLO mail2.shareable.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755083Ab0LBBTE (ORCPT ); Wed, 1 Dec 2010 20:19:04 -0500 Date: Thu, 2 Dec 2010 01:18:33 +0000 From: Jamie Lokier To: Valdis.Kletnieks@vt.edu Cc: Lennart Poettering , Alexander Shishkin , linux-kernel@vger.kernel.org, Thomas Gleixner , Alexander Viro , Greg Kroah-Hartman , Feng Tang , Andrew Morton , Michael Tokarev , Marcelo Tosatti , John Stultz , Chris Friesen , Kay Sievers , "Kirill A. Shutemov" , Artem Bityutskiy , Davide Libenzi , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] [RFC] timerfd: add TFD_NOTIFY_CLOCK_SET to watch for clock changes Message-ID: <20101202011832.GO22787@shareable.org> References: <1290532938-7332-1-git-send-email-virtuoso@slind.org> <20101123224346.GA19350@tango.0pointer.de> <20101201104359.GJ22787@shareable.org> <20180.1291243569@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180.1291243569@localhost> User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1478 Lines: 33 Valdis.Kletnieks@vt.edu wrote: > On Wed, 01 Dec 2010 10:43:59 GMT, Jamie Lokier said: > > > So maybe CLOCK_MONOTONIC should be changed to include elapsed time > > during suspend/resume, and CLOCK_MONOTONIC_RAW could remain as it is, > > for programs that want that? > > Wouldn't that be an API break for programs that are expecting the current > behavior of CLOCK_MONOTONIC? Yes, there should be a way to request either of > them - but if there's only one way now, it should continue to act the current > way, and the added way is the second option. I don't know. Can you think of any program which would break if suspend/resume's clocks behaved like ordinary task scheduling - when a task doesn't run for a long time because of scheduling decisions? Hmm, I guess some realtime apps might like to know. Currently CLOCK_MONOTONIC jumps forwards by 4 seconds on suspend/resume anyway (as seen by userspace), on my x86 laptop running 2.6.37-rc3. So it does already jump a bit... But see my other reply; maybe there's no need to change it. A reliable, immediate notification that CLOCK_MONOTONIC's relationship to real time has been disrupted by an unknown amount would be sufficient for the problems I have in mind. -- Jamie -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/