Re: [PATCH] Revised timerfd() interface

2007-09-09 Thread Michael Kerrisk
Hi Davide, >> This function is *not at all* equivalent to the "get" >> functionality of the previous APIs. The "get" functionality >> of POSIX timers (for example) returns a structure that contains >> the timer interval and the *time until the next expiration of >> the timer* (not the initial

Re: [PATCH] Revised timerfd() interface

2007-09-09 Thread Michael Kerrisk
Hi Davide, This function is *not at all* equivalent to the get functionality of the previous APIs. The get functionality of POSIX timers (for example) returns a structure that contains the timer interval and the *time until the next expiration of the timer* (not the initial timer string, as

Re: [PATCH] Revised timerfd() interface

2007-09-06 Thread Davide Libenzi
On Thu, 6 Sep 2007, Michael Kerrisk wrote: > You are asserting this in the face of two previous APIs designed > by people who (at least in the case of POSIX timers) probably > thoroughly examined and discussed existing APIs and practice. You really think that. Uhmm, ok. > This function is

Re: [PATCH] Revised timerfd() interface

2007-09-06 Thread Michael Kerrisk
Hi Davide, > > > > > > > > As I think about this more, I see more problems with > > > > > > > > your argument. timerfd needs the ability to get and > > > > > > > > get-while-setting just as much as the earlier APIs. > > > > > > > > Consider a library that creates a timerfd file descriptor > > >

Re: [PATCH] Revised timerfd() interface

2007-09-06 Thread Davide Libenzi
On Thu, 6 Sep 2007, Michael Kerrisk wrote: You are asserting this in the face of two previous APIs designed by people who (at least in the case of POSIX timers) probably thoroughly examined and discussed existing APIs and practice. You really think that. Uhmm, ok. This function is *not

Re: [PATCH] Revised timerfd() interface

2007-09-05 Thread Davide Libenzi
On Thu, 6 Sep 2007, Michael Kerrisk wrote: > Hi Davide, > > > > > > > > As I think about this more, I see more problems with > > > > > > > your argument. timerfd needs the ability to get and > > > > > > > get-while-setting just as much as the earlier APIs. > > > > > > > Consider a library that

Re: [PATCH] Revised timerfd() interface

2007-09-05 Thread Michael Kerrisk
Hi Davide, > > > > > > As I think about this more, I see more problems with > > > > > > your argument. timerfd needs the ability to get and > > > > > > get-while-setting just as much as the earlier APIs. > > > > > > Consider a library that creates a timerfd file descriptor that > > > > > > is

Re: [PATCH] Revised timerfd() interface

2007-09-05 Thread Davide Libenzi
On Wed, 5 Sep 2007, Michael Kerrisk wrote: > Hi Davide, > > > > > > As I think about this more, I see more problems with > > > > > your argument. timerfd needs the ability to get and > > > > > get-while-setting just as much as the earlier APIs. > > > > > Consider a library that creates a

Re: [PATCH] Revised timerfd() interface

2007-09-05 Thread Michael Kerrisk
Hi Davide, > > > > As I think about this more, I see more problems with > > > > your argument. timerfd needs the ability to get and > > > > get-while-setting just as much as the earlier APIs. > > > > Consider a library that creates a timerfd file descriptor that > > > > is handed off to an

Re: [PATCH] Revised timerfd() interface

2007-09-05 Thread Davide Libenzi
On Wed, 5 Sep 2007, Michael Kerrisk wrote: > Davide, A Michael! > > > As I think about this more, I see more problems with > > > your argument. timerfd needs the ability to get and > > > get-while-setting just as much as the earlier APIs. > > > Consider a library that creates a timerfd file

Re: [PATCH] Revised timerfd() interface

2007-09-05 Thread Denys Vlasenko
On Tuesday 04 September 2007 16:25, Davide Libenzi wrote: > On Tue, 4 Sep 2007, Andrew Morton wrote: > > > > On Tue, 04 Sep 2007 10:03:56 +0200 Michael Kerrisk <[EMAIL PROTECTED]> > > > wrote: > > > Davide, > > > > > > >> Davide -- ping! Can you please offer your comments about this change, >

Re: [PATCH] Revised timerfd() interface

2007-09-05 Thread Andrew Morton
> On Wed, 05 Sep 2007 02:08:31 +0200 "Michael Kerrisk" <[EMAIL PROTECTED]> > wrote: > Davide, > > > > As I think about this more, I see more problems with > > > your argument. timerfd needs the ability to get and > > > get-while-setting just as much as the earlier APIs. > > > Consider a

Re: [PATCH] Revised timerfd() interface

2007-09-05 Thread Andrew Morton
On Wed, 05 Sep 2007 02:08:31 +0200 Michael Kerrisk [EMAIL PROTECTED] wrote: Davide, As I think about this more, I see more problems with your argument. timerfd needs the ability to get and get-while-setting just as much as the earlier APIs. Consider a library that creates a

Re: [PATCH] Revised timerfd() interface

2007-09-05 Thread Denys Vlasenko
On Tuesday 04 September 2007 16:25, Davide Libenzi wrote: On Tue, 4 Sep 2007, Andrew Morton wrote: On Tue, 04 Sep 2007 10:03:56 +0200 Michael Kerrisk [EMAIL PROTECTED] wrote: Davide, Davide -- ping! Can you please offer your comments about this change, and also

Re: [PATCH] Revised timerfd() interface

2007-09-05 Thread Davide Libenzi
On Wed, 5 Sep 2007, Michael Kerrisk wrote: Davide, A Michael! As I think about this more, I see more problems with your argument. timerfd needs the ability to get and get-while-setting just as much as the earlier APIs. Consider a library that creates a timerfd file descriptor

Re: [PATCH] Revised timerfd() interface

2007-09-05 Thread Michael Kerrisk
Hi Davide, As I think about this more, I see more problems with your argument. timerfd needs the ability to get and get-while-setting just as much as the earlier APIs. Consider a library that creates a timerfd file descriptor that is handed off to an application: that

Re: [PATCH] Revised timerfd() interface

2007-09-05 Thread Davide Libenzi
On Wed, 5 Sep 2007, Michael Kerrisk wrote: Hi Davide, As I think about this more, I see more problems with your argument. timerfd needs the ability to get and get-while-setting just as much as the earlier APIs. Consider a library that creates a timerfd file descriptor

Re: [PATCH] Revised timerfd() interface

2007-09-05 Thread Michael Kerrisk
Hi Davide, As I think about this more, I see more problems with your argument. timerfd needs the ability to get and get-while-setting just as much as the earlier APIs. Consider a library that creates a timerfd file descriptor that is handed off to an application:

Re: [PATCH] Revised timerfd() interface

2007-09-05 Thread Davide Libenzi
On Thu, 6 Sep 2007, Michael Kerrisk wrote: Hi Davide, As I think about this more, I see more problems with your argument. timerfd needs the ability to get and get-while-setting just as much as the earlier APIs. Consider a library that creates a timerfd file

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Michael Kerrisk
Davide, > > As I think about this more, I see more problems with > > your argument. timerfd needs the ability to get and > > get-while-setting just as much as the earlier APIs. > > Consider a library that creates a timerfd file descriptor that > > is handed off to an application: that library

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Davide Libenzi
On Tue, 4 Sep 2007, Michael Kerrisk wrote: > > Useless like it'd be a motorcycle w/out a cup-holder :) > > Seriously, the ability to get the previous values from "something" could > > have a meaning if this something is a shared global resource (like > > signals > > for example). In the timerfd

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Davide Libenzi
On Tue, 4 Sep 2007, Michael Kerrisk wrote: > Hi Davide, > > > > > > > > > > I'd have thought that the existing stuff would be near-useless without > > > the capabilities which you describe? > > > > Useless like it'd be a motorcycle w/out a cup-holder :) > > Seriously, the ability to get the

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Michael Kerrisk
> > > The ABI change doesn't really matter, since timerfd() was broken in > > > 2.6.22 anyway. > > > > > > Both previous APIs provided the features I have described provide: > > > > > > * the ability to fetch the old timer value when applying > > > a new setting > > > > > > * the ability to

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Michael Kerrisk
Hi Davide, > > > > > > I'd have thought that the existing stuff would be near-useless without > > the capabilities which you describe? > > Useless like it'd be a motorcycle w/out a cup-holder :) > Seriously, the ability to get the previous values from "something" could > have a meaning if

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Davide Libenzi
On Tue, 4 Sep 2007, Andrew Morton wrote: > > On Tue, 04 Sep 2007 10:03:56 +0200 Michael Kerrisk <[EMAIL PROTECTED]> > > wrote: > > Davide, > > > > >> Davide -- ping! Can you please offer your comments about this change, > > >> and > > >> also thoughts on Jon's and my comments about a more

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Michael Kerrisk
[...] > > Neither of the proposed APIs (either my multiplexed version of > > timerfd() > > or Jon's/my idea of using three system calls (like POSIX timers), or > > the notion of timerfd() integrated with POSIX timers) is more > > complicated than the existing POSIX timers API. > > > > The ABI

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Andrew Morton
> On Tue, 04 Sep 2007 10:03:56 +0200 Michael Kerrisk <[EMAIL PROTECTED]> wrote: > Davide, > > >> Davide -- ping! Can you please offer your comments about this change, and > >> also thoughts on Jon's and my comments about a more radical API change > >> later in this thread. > > > > IMO the

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Michael Kerrisk
Davide, >> Davide -- ping! Can you please offer your comments about this change, and >> also thoughts on Jon's and my comments about a more radical API change >> later in this thread. > > IMO the complexity of the resulting API (and resulting patch), and the ABI > change, is not justified by

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Michael Kerrisk
Davide, Davide -- ping! Can you please offer your comments about this change, and also thoughts on Jon's and my comments about a more radical API change later in this thread. IMO the complexity of the resulting API (and resulting patch), and the ABI change, is not justified by the added

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Andrew Morton
On Tue, 04 Sep 2007 10:03:56 +0200 Michael Kerrisk [EMAIL PROTECTED] wrote: Davide, Davide -- ping! Can you please offer your comments about this change, and also thoughts on Jon's and my comments about a more radical API change later in this thread. IMO the complexity of the

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Michael Kerrisk
[...] Neither of the proposed APIs (either my multiplexed version of timerfd() or Jon's/my idea of using three system calls (like POSIX timers), or the notion of timerfd() integrated with POSIX timers) is more complicated than the existing POSIX timers API. The ABI change doesn't

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Davide Libenzi
On Tue, 4 Sep 2007, Andrew Morton wrote: On Tue, 04 Sep 2007 10:03:56 +0200 Michael Kerrisk [EMAIL PROTECTED] wrote: Davide, Davide -- ping! Can you please offer your comments about this change, and also thoughts on Jon's and my comments about a more radical API change

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Michael Kerrisk
Hi Davide, wakes up I'd have thought that the existing stuff would be near-useless without the capabilities which you describe? Useless like it'd be a motorcycle w/out a cup-holder :) Seriously, the ability to get the previous values from something could have a meaning if this

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Michael Kerrisk
The ABI change doesn't really matter, since timerfd() was broken in 2.6.22 anyway. Both previous APIs provided the features I have described provide: * the ability to fetch the old timer value when applying a new setting * the ability to non-destructively fetch the

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Davide Libenzi
On Tue, 4 Sep 2007, Michael Kerrisk wrote: Hi Davide, wakes up I'd have thought that the existing stuff would be near-useless without the capabilities which you describe? Useless like it'd be a motorcycle w/out a cup-holder :) Seriously, the ability to get the previous

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Davide Libenzi
On Tue, 4 Sep 2007, Michael Kerrisk wrote: Useless like it'd be a motorcycle w/out a cup-holder :) Seriously, the ability to get the previous values from something could have a meaning if this something is a shared global resource (like signals for example). In the timerfd case this

Re: [PATCH] Revised timerfd() interface

2007-09-04 Thread Michael Kerrisk
Davide, As I think about this more, I see more problems with your argument. timerfd needs the ability to get and get-while-setting just as much as the earlier APIs. Consider a library that creates a timerfd file descriptor that is handed off to an application: that library may want

Re: [PATCH] Revised timerfd() interface

2007-08-30 Thread Davide Libenzi
On Sat, 25 Aug 2007, Michael Kerrisk wrote: > Davide -- ping! Can you please offer your comments about this change, and > also thoughts on Jon's and my comments about a more radical API change > later in this thread. IMO the complexity of the resulting API (and resulting patch), and the ABI

Re: [PATCH] Revised timerfd() interface

2007-08-30 Thread Davide Libenzi
On Sat, 25 Aug 2007, Michael Kerrisk wrote: Davide -- ping! Can you please offer your comments about this change, and also thoughts on Jon's and my comments about a more radical API change later in this thread. IMO the complexity of the resulting API (and resulting patch), and the ABI

Re: [PATCH] Revised timerfd() interface

2007-08-25 Thread Michael Kerrisk
[resend, since LKML didn't like last send.] Randy, Thanks for the input. I will try to send a revised patch after I get back from holiday. Some comments below. Davide -- ping! Can you please offer your comments about this change, and also thoughts on Jon's and my comments about a more

Re: [PATCH] Revised timerfd() interface

2007-08-25 Thread Michael Kerrisk
[resend, since LKML didn't like last send.] Randy, Thanks for the input. I will try to send a revised patch after I get back from holiday. Some comments below. Davide -- ping! Can you please offer your comments about this change, and also thoughts on Jon's and my comments about a more

Re: [PATCH] Revised timerfd() interface

2007-08-15 Thread Jonathan Corbet
Sorry for the late commentary...as I looked this over, one thing popped into my mind > b) Make the 'clockid' immutable: it can only be set >if 'ufd' is -1 -- that is, on the timerfd() call that >first creates a timer. timerfd() is looking increasingly like a multiplexor system call

Re: [PATCH] Revised timerfd() interface

2007-08-15 Thread Jonathan Corbet
Sorry for the late commentary...as I looked this over, one thing popped into my mind b) Make the 'clockid' immutable: it can only be set if 'ufd' is -1 -- that is, on the timerfd() call that first creates a timer. timerfd() is looking increasingly like a multiplexor system call in

Re: [PATCH] Revised timerfd() interface

2007-08-13 Thread Randy Dunlap
On Thu, 09 Aug 2007 23:11:45 +0200 Michael Kerrisk wrote: > Andrew, > > Here's my first shot at changing the timerfd() interface; patch > is against 2.6.23-rc1-mm2. > > I think I got to the bottom of understanding the timer code in > the end, but I may still have missed some things... > > This

Re: [PATCH] Revised timerfd() interface

2007-08-13 Thread Randy Dunlap
On Thu, 09 Aug 2007 23:11:45 +0200 Michael Kerrisk wrote: Andrew, Here's my first shot at changing the timerfd() interface; patch is against 2.6.23-rc1-mm2. I think I got to the bottom of understanding the timer code in the end, but I may still have missed some things... This is my

[PATCH] Revised timerfd() interface

2007-08-09 Thread Michael Kerrisk
Andrew, Here's my first shot at changing the timerfd() interface; patch is against 2.6.23-rc1-mm2. I think I got to the bottom of understanding the timer code in the end, but I may still have missed some things... This is my first kernel patch of any substance. Perhaps Randy or Christoph can

[PATCH] Revised timerfd() interface

2007-08-09 Thread Michael Kerrisk
Andrew, Here's my first shot at changing the timerfd() interface; patch is against 2.6.23-rc1-mm2. I think I got to the bottom of understanding the timer code in the end, but I may still have missed some things... This is my first kernel patch of any substance. Perhaps Randy or Christoph can