Prev: linux-next: build failure after merge of the final tree (nfs tree related)
Next: [GIT] kbuild: packaging
From: john stultz on 5 Aug 2010 18:40 On Thu, 2010-08-05 at 15:29 -0700, john stultz wrote: > On Fri, 2010-08-06 at 00:17 +0200, Kay Sievers wrote: > > On Thu, Aug 5, 2010 at 23:11, john stultz <johnstul(a)us.ibm.com> wrote: > > > On Thu, 2010-08-05 at 15:33 +0300, Alexander Shishkin wrote: > > >> On 4 August 2010 18:58, john stultz <johnstul(a)us.ibm.com> wrote: > > >> > Is there a actual use case that you need this for? I don't really have > > >> > an issue with the code I just really want to make sure the feature would > > >> > be useful enough to justify the API and code maintenance going forward. > > > > Basically everything that schedules an action based on an absolute > > time specification, like at 3pm today, and not in 3 hours from now, > > needs to track such system time changes. Otherwise it has to do > > nonsense like cron does, to wake up every minute to check the current > > time. > > time_create(CLOCK_REALTIME,...) creates absolute (not relative) timers Sorry, *timer_create*. thanks -john -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: H. Peter Anvin on 5 Aug 2010 18:40 On 08/05/2010 03:22 PM, Kay Sievers wrote: > > I think that's really awkward interface, to pass file descriptor > numbers around and write them to magic sysfs files. > > I would very much prefer a file that contains the current time, and > wakes up possible users with a POLL_ERR on changes caused by some > other process. That works very well for things like /proc/mounts, is > easy to get, and does not need a full page of weird instructions to > get stuff done. :) > Okay, what's wrong with having a file descriptor that gets *written to* on a notification? Why POLL_ERR? -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Greg KH on 5 Aug 2010 18:40 On Fri, Aug 06, 2010 at 12:22:27AM +0200, Kay Sievers wrote: > On Thu, Aug 5, 2010 at 23:38, Greg KH <gregkh(a)suse.de> wrote: > > On Thu, Aug 05, 2010 at 02:11:05PM -0700, john stultz wrote: > >> On Thu, 2010-08-05 at 15:33 +0300, Alexander Shishkin wrote: > >> > On 4 August 2010 18:58, john stultz <johnstul(a)us.ibm.com> wrote: > >> > > Is there a actual use case that you need this for? �I don't really have > >> > > an issue with the code I just really want to make sure the feature would > >> > > be useful enough to justify the API and code maintenance going forward. > >> > > >> > Yes. What we have here is an application which takes care of different means > >> > of time synchronization (trusted time servers, different GSM operators, etc) > >> > and also different kinds of time-based events/notifications (like "dentist > >> > appointment next thursday"). When it encounters a time change that is > >> > made by some other application, it basically wants to disable automatic > >> > time adjustment and trigger the events/notifications which are due at this > >> > (new) time. > >> > >> Ok. Something specific is always more helpful then theoretical uses. > >> > >> I think the filtering is still a bit controversial, so you might want to > >> respin it without that. But otherwise I'm ok with it as long as no one > >> else objects to any of the minor details of the interface > >> > >> GregKH: Does /sys/kernel/time_notify seem ok by you? > > > > Um, it depends, what is that file going to do? �I don't see a > > Documentation/ABI/ entry here that describes it fully :) > > I think that's really awkward interface, to pass file descriptor > numbers around and write them to magic sysfs files. Ick, really? That's not ok for sysfs. > I would very much prefer a file that contains the current time, and > wakes up possible users with a POLL_ERR on changes caused by some > other process. That works very well for things like /proc/mounts, is > easy to get, and does not need a full page of weird instructions to > get stuff done. :) That sounds more reasonable. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: H. Peter Anvin on 5 Aug 2010 18:50 On 08/05/2010 03:39 PM, Kay Sievers wrote: >> >> Okay, what's wrong with having a file descriptor that gets *written to* >> on a notification? > > Because it needs documentation, and is just not needed for such a > simple thing, I think. Why would you want to write a fd number to a > magic file, which can be your fd right away, even passing you the data > on read(). > I didn't mean that, I meant a note that you open and get a pipe/socket/*. >> Why POLL_ERR? > > Because normal files can not be poll()ed, and it's not that new data > has arrived, it just tells you to rewind and read it again. It's > commonly used: > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=5addc5dd8836aa061f6efc4a0d9ba6323726297a It makes sense there, I guess, as some kind of sideband notification is highly useful. Too bad we don't have a generic mechanism on files other than inotify... a lot of things could use it (including tail, which I think uses inotify now.) -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Kay Sievers on 5 Aug 2010 18:50
On Fri, Aug 6, 2010 at 00:34, H. Peter Anvin <hpa(a)zytor.com> wrote: > On 08/05/2010 03:22 PM, Kay Sievers wrote: >> >> I think that's really awkward interface, to pass file descriptor >> numbers around and write them to magic sysfs files. >> >> I would very much prefer a file that contains the current time, and >> wakes up possible users with a POLL_ERR on changes caused by some >> other process. That works very well for things like /proc/mounts, is >> easy to get, and does not need a full page of weird instructions to >> get stuff done. :) >> > > Okay, what's wrong with having a file descriptor that gets *written to* > on a notification? Because it needs documentation, and is just not needed for such a simple thing, I think. Why would you want to write a fd number to a magic file, which can be your fd right away, even passing you the data on read(). > Why POLL_ERR? Because normal files can not be poll()ed, and it's not that new data has arrived, it just tells you to rewind and read it again. It's commonly used: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=5addc5dd8836aa061f6efc4a0d9ba6323726297a Kay -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |