[ltp] Re: New thinkpad recomendation

Michael Karcher linux-thinkpad@linux-thinkpad.org
Thu, 11 Dec 2008 22:08:52 +0100


--=-KM8lQJwZT8/LBdb7/kWu
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Am Donnerstag, den 11.12.2008, 19:53 +0000 schrieb Richard Neill:
> > Another point: IIRC users can only make their
> > processes nicer, but never return to the original priority. How do you
> > (Richard) unnice them if you need them?
> You can use renice to get down to 0 again - use
>    renice  NICENESS  PID
> where NICENESS is 0..20  (unless you are root, in which case you can=20
> have a negative number).
No. It doesn't work on Linux. The manpage says:

BUGS
     Non super-users can not increase scheduling priorities of their own pr=
o=E2=80=90
     cesses, even if they were the ones that decreased the priorities in th=
e
     first place.

And that's still true:
karcher@hermes2:~$ sleep 1000 &
[1] 5210
karcher@hermes2:~$ ps -o nice 5210
 NI
  0
karcher@hermes2:~$ renice 10 5210
5210: old priority 0, new priority 10
karcher@hermes2:~$ ps -o nice 5210
 NI
 10
karcher@hermes2:~$ renice 0 5210
renice: 5210: setpriority: Keine Berechtigung
karcher@hermes2:~$ ps -o nice 5210
 NI
 10

> On a laptop with a single-user, I'd also consider that passwordless=20
> sudo, or a setuid-root perl script is an acceptable security choice.
Of course. That would be the way to circumvent this restriction.

Regards,
  Michael Karcher

--=-KM8lQJwZT8/LBdb7/kWu
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Dies ist ein digital signierter Nachrichtenteil

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAklBgVsACgkQzhek2R7EicqU4wCffaPeS6so7fWqH6QIt94ATwoJ
MdEAoIn4dPSaK52YqY+r8ZeQMkCTXURA
=lrSU
-----END PGP SIGNATURE-----

--=-KM8lQJwZT8/LBdb7/kWu--