tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Proposal for new syscalls: getrusagex and waitx

On Mon, Oct 20, 2008 at 08:24:26AM -0700, Matt Thomas wrote:
> On Oct 18, 2008, at 11:10 AM, David Holland wrote:
>> On Thu, Oct 16, 2008 at 10:09:39PM -0700, Matt Thomas wrote:
>>> I'd to add return some additional data in getrusage or wait4.  Extending
>>> struct rusage seems to be a losing proposition since I will need to 
>>> version
>>> the syscalls and provide compatiblity shims.  I might as well just add
>>> variants that return proplib dictionaries with the information.
>>> int getrusagex(int who, struct plistref *dict)
>>> int waitx(pid_t wpid, int *status, int options, struct plistref *rusage);


>> More importantly, however, do you expect the additional data to be of
>> interest to 3rd-party callers? Because if so we'll end up doing all
>> the same versioning to provide an extended struct rusage to them,
>> except that it'll have to be done in libc where such versioning is
>> much harder. That's not a win.
> Huh?  I intend to return more statistics.  There's no reason to do anything
> in libc.  If you want to access the new items, just grab them directly from
> the proplib.


> Well, I think you're reasons are for the most bogus.

Perhaps that's because you ignored the important question. Do you
expect 3rd-party software to use proplib instead of struct rusage?

If not, then if these new statistics are useful to 3rd-party software,
we'll end up inserting them into struct rusage anyway, and then we get
to do the version/compat dance after all except that you'll have made
it harder. (Unless the data you're returning is of no value to any
3rd-party program, which is why I asked what it was.)

If you do think 3rd-party software is going to use proplib, I think
you're being vastly overoptimistic.

(I also question your assertion that switching to a plist makes all
future versioning concerns irrelevant, but that's a separate issue.)

David A. Holland

Home | Main Index | Thread Index | Old Index