Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755585Ab0LBAOi (ORCPT ); Wed, 1 Dec 2010 19:14:38 -0500 Received: from e1.ny.us.ibm.com ([32.97.182.141]:42194 "EHLO e1.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752402Ab0LBAOh (ORCPT ); Wed, 1 Dec 2010 19:14:37 -0500 Subject: Re: [PATCH] timerfd: add TFD_NOTIFY_CLOCK_SET to watch for clock changes From: john stultz To: Alexander Shishkin Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Alexander Viro , Greg Kroah-Hartman , Feng Tang , Andrew Morton , Michael Tokarev , Marcelo Tosatti , Chris Friesen , Kay Sievers , "Kirill A. Shutemov" , Artem Bityutskiy , Davide Libenzi , Lennart Poettering , linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org In-Reply-To: <1291167587-16695-1-git-send-email-virtuoso@slind.org> References: <1291167587-16695-1-git-send-email-virtuoso@slind.org> Content-Type: text/plain; charset="UTF-8" Date: Wed, 01 Dec 2010 16:14:27 -0800 Message-ID: <1291248867.2846.37.camel@work-vm> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit X-Content-Scanned: Fidelis XPS MAILER Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1006 Lines: 24 On Wed, 2010-12-01 at 03:39 +0200, Alexander Shishkin wrote: > To use this notification functionality, user has to call timerfd_settime() > with TFD_NOTIFY_CLOCK_SET flag. After this CLOCK_REALTIME timers will > read as the number of times the wall clock has been set since last read > and poll every time the wall clock is set; CLOCK_MONOTONIC timers will > behave likewise, but in the event of the clock being updated upon resuming > from suspend. For both CLOCK_REALTIME and CLOCK_MONOTONIC timers with > TFD_NOTIFY_CLOCK_SET flag set, a call to timerfd_gettime() will return > current wall clock in it_value. The CLOCK_MONOTONIC flag on resume worries me a bit (since CLOCK_MONOTONIC isn't adjusted on resume). What is the use case there? thanks -john -- 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/