Re: User lowering&raising priority of his processes, is it possible?

Peter Samuelson (peter@wire.cadcamlab.org)
Sun, 14 Nov 1999 15:41:27 -0600 (CST)


[Anatoly Akkerman]
> I was trying to manage processes purely from user space for my
> research project and bumped into a policy that seems a little strange
> to me. Linux lets users only lower priority of their processes. Now,
> once the priority is lowered, you can't raise it back. Why not?!

That would entail keeping min_nice as part of process state. And you
need to add an interface to change min_nice (with the same restrictions
as current nice value, that is, need CAP_SYS_NICE to decrease value),
and you need to work out what happens with a setuid-root execpv(), and
you need to work out what happens after set*uid() calls, and you may
need to worry about breaking old software that doesn't know about the
nice-min interface and assumes that if it does "fork(); nice();
execl()" the child will not be able to un-nice itself.

Roll up a patch; I'm sure someone could find it useful.

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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