Re: Resource limits interface proposal [was: pull request for writable limits]

From: Alexey Dobriyan
Date: Thu May 06 2010 - 02:39:34 EST


On Wed, May 5, 2010 at 6:08 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>> It may also be that rlimit64 will contain flags like:
>> #define RLIM64_CUR_INFINITY     0x00000001
>> #define RLIM64_MAX_INFINITY     0x00000002
>> struct rlimit64 {
>>         __u64 rlim_cur;
>>         __u64 rlim_max;
>>         __u32 flags;
>> };
>> if I understood Alexey correctly to separate limits values from
>> infinity? flags then will be converted to ~0ul when converting from
>> rlimit64 to rlimit above too.
>
> Ok, I'm not entirely sure we need to care specially about INFINITY,
> _especially_ since INF is really rather big in 64 bits. So to some degree,
> making things 64-bit is _less_ likely to make INFINITIES a problem.

I'm _sure_, someone will mention bloat and performance degradation
on 32-bit, so there will be config option for 32-bit in-kernel limits.
And if there will be config option, infinities are better be separated.
--
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/