boinc should use chrt instead of schedtool

Bug #527639 reported by Evgeny Kapun
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
boinc (Ubuntu)
Wishlist
Unassigned

Bug Description

Binary package hint: boinc-client

boinc-client 6.4.5+dfsg-2ubuntu2.
Currently boinc-client init script (/etc/init.d/boinc-client) uses schedtool to set scheduling policy for BOINC client. I think it should use chrt(1) for this, because:
* schedtool has to be installed separately, and nothing except boinc-client depend on it.
* chrt is a part of util-linux package, which is essential, so almost every Ubuntu user has it installed.

TODO:
 - Check if util-linux is essential on Debian, too.

Daniel Hahler (blueyed)
Changed in boinc (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Daniel Hahler (blueyed) wrote :

This makes sense to me.

I've started to change this.

Shortcomings: "chrt -p $PID" will not display niceness.
PID 12161: PRIO 0, POLICY D: SCHED_IDLEPRIO, NICE 19, AFFINITY 0x3
vs
pid 12161's current scheduling policy: SCHED_IDLE
pid 12161's current scheduling priority: 0

What's the best way to get niceness of a given process?

Also, chrt does not accept multiple PIDs at once, so a loop is necessary (which I've abstracted into chrt_many function).

Apart from this, it works as expected. See the attached patch.

tags: added: patch
Revision history for this message
Daniel Hahler (blueyed) wrote :

Please note: I could submit this patch myself, but would appreciate some feedback about it first.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Does this patch apply also on debian?

Revision history for this message
Daniel Hahler (blueyed) wrote : Re: [Bug 527639] Re: boinc should use chrt instead of schedtool

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Does this patch apply also on debian?

Yes, of course - at least as far as I can see. It should get applied to
Debian then, too.

- --
http://daniel.hahler.de/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLrPi4fAK/hT/mPgARAiL2AKCXPRW0FVa96m5dbTM/JLxAIf4+OQCgxf1Z
nC4EbAORPCQ32MRoxMao+1g=
=phLx
-----END PGP SIGNATURE-----

Daniel Hahler (blueyed)
description: updated
Daniel Hahler (blueyed)
Changed in boinc (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package boinc - 6.10.58-0ubuntu3

---------------
boinc (6.10.58-0ubuntu3) maverick; urgency=low

  * Use chrt instead of schedtool (LP: #527639)
    - debian/control, debian/boinc-client.init
 -- Daniel Hahler <email address hidden> Tue, 13 Jul 2010 23:49:19 +0200

Changed in boinc (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers