From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: Re: [PATCH] [RFC] timerfd: add TFD_NOTIFY_CLOCK_SET to watch for clock changes Date: Wed, 24 Nov 2010 10:05:35 +0200 Message-ID: <1290585935.2438.14.camel@localhost> References: <1290532938-7332-1-git-send-email-virtuoso@slind.org> <20101123224346.GA19350@tango.0pointer.de> Reply-To: dedekind1@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: 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" , Davide Libenzi , linux-fsdevel@vger.kernel.org To: Lennart Poettering Return-path: In-Reply-To: <20101123224346.GA19350@tango.0pointer.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, 2010-11-23 at 23:43 +0100, Lennart Poettering wrote: > On Tue, 23.11.10 19:22, Alexander Shishkin (virtuoso@slind.org) wrote= : >=20 > > Certain userspace applications (like "clock" desktop applets or cro= n or > > systemd) might want to be notified when some other application chan= ges > > the system time. There are several known to me reasons for this: > > - avoiding periodic wakeups to poll time changes; > > - rearming CLOCK_REALTIME timers when said changes happen; > > - changing system timekeeping policy for system-wide time manageme= nt > > programs; > > - keeping guest applications/operating systems running in emulator= s > > up to date. > >=20 > > This is another attempt to approach notifying userspace about syste= m > > clock changes. The other one is using an eventfd and a syscall [1].= In > > the course of discussing the necessity of a syscall for this kind o= f > > notifications, it was suggested that this functionality can be achi= eved > > via timers [2] (and timerfd in particular [3]). This idea got quite > > some support [4], [5], [6] and some vague criticism [7], so I decid= ed > > to try and go a bit further with it. >=20 > I agree with Kay, this is pretty much exactly what we want for > systemd. (Assuming that the time jump due to system suspend is > propagated to userspace like any other time jump with this path). A "Tested-by: Lennart Poettering " would be helpful, I think. > So yeah, I'd be very happy if this could be merged. Hmm, and question about why exactly the timerfd interface is a bad way to go was ignored. --=20 Best Regards, Artem Bityutskiy (=D0=90=D1=80=D1=82=D1=91=D0=BC =D0=91=D0=B8=D1=82=D1=8E= =D1=86=D0=BA=D0=B8=D0=B9)