Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

From: Ingo Molnar
Date: Wed Feb 02 2005 - 06:41:10 EST



* Jack O'Quin <joq@xxxxxx> wrote:

> Remember when I asked how you handle changes to sizeof(struct rusage)?
> That was a serious question. I hope there's a solution. [...]

what does any of what we've talking about have to do with struct rusage?

One of the patches i wrote adds a new rlimit. It has no impact on
rusage, at all. A new rlimit can be added transparently, we routinely
add new rlimits, and no, most of them have no matching rusage fields!

> But, I got no answer, only handwaving.

i very much replied to your point:

http://marc.theaimsgroup.com/?l=linux-kernel&m=110672338910363&w=2

" > Does getrusage() return anything for this? How can a field be added
> to the rusage struct without breaking binary compatibility? Can we
> assume that no programs ever use sizeof(struct rusage)?

rlimits are easily extended and there are no binary compatibility
worries. The kernel doesnt export the maximum towards userspace.
getrusage() will return the value on new kernels and will return
-EINVAL on old kernels, so new userspace can deal with this
accordingly. "

(and here i meant getrlimit(), not getrusage() - getrusage() is not
affected by the patch at all.)

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/