Re: [RFD] 'nice' attribute for executable files

Måns Rullgård
2005-03-30T20:46:04Z

Wiktor <victorjan@poczta.onet.pl> writes:

> Måns Rullgård wrote:
>>
>> You could wrap /lib/ld-linux.so, and get all dynamically linked
>> programs done in one sweep.
>>
> That's mad idea -

Sure, but it's possible.

> keep similar things in one place! starting programs is done in
> kernel and nice-value-support is also done in kernel!!

Just because it can be done in the kernel, doesn't mean it should be.
In fact, the more that can be kept outside the kernel, the better.

>> Using a shell to run external programs is quite common. The system()
>> and popen() functions both invoke the shell.
>>
> Yes, but compexity of 'sh -c /some/command' is uncomparable to one of
> shell-level-program-renicing system. such system should keep database
> of reniced processes, parse it (using awk or sed, i'm afraid...) and

It wouldn't need to be more complicated than a POSIX extended
attribute.

> then renice process (what also takes two files[!, they are in fact
> one-liners, but it is needed to gain root privileges to renice
> process]). sorry, but linux works smoothly on 386, and such mess would
> surely change it.

The Linux kernel is pretty stable, but tampering with internals in
such a way would surely change it.

>> I'm not so sure it belongs at all. The can of worms it opens up is a
>> bit too big, IMHO.
>>
> What can?

Pandora's.

> the only account that have access to renicing field is root. if

So you are proposing the addition of a per-file attribute, with
restricted access, and potentially dangerous effects if set
incorrectly. This, combined with the fact that is unlikely to receive
much testing, all speaks against it.

--
Måns Rullgård
mru@inprovide.com