diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-24 16:13:09 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-24 16:13:09 -0300 |
commit | 2554cde3395fac77a850df5282e21d7d24a90f3e (patch) | |
tree | 5d63955cf440b05a5be67797282e2ecce611c777 | |
parent | 3271567b93b5f8c0c61a017a7748c621e89dfe37 (diff) | |
download | tuna-2554cde3395fac77a850df5282e21d7d24a90f3e.tar.gz |
tuna: Don't touch the migration/* thread scheduler policy/prio
As:
[root@sandy tuna]# chrt --pid 8
pid 8's current scheduling policy: SCHED_FIFO
pid 8's current scheduling priority: 99
[root@sandy tuna]#
[root@sandy tuna]# tuna -t 8 -P
thread ctxt_switches
pid SCHED_ rtpri affinity voluntary nonvoluntary cmd
8 FIFO 99 0 59190 0 migration/0
[root@sandy tuna]#
[root@sandy tuna]# chrt --fifo --pid 99 8
chrt: failed to set pid 8's policy: Invalid argument
[root@sandy tuna]# chrt --fifo --pid 98 8
chrt: failed to set pid 8's policy: Invalid argument
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-x | tuna/tuna.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tuna/tuna.py b/tuna/tuna.py index a7a24a7..290ff35 100755 --- a/tuna/tuna.py +++ b/tuna/tuna.py @@ -478,8 +478,13 @@ def get_kthread_sched_tunings(proc = None): kthreads = {} for pid in proc.keys(): - if iskthread(pid): - name = proc[pid]["stat"]["comm"] + name = proc[pid]["stat"]["comm"] + # Trying to set the priority of the migration threads will + # fail, at least on 3.6.0-rc1 and doesn't make sense anyway + # and this function is only used to save those priorities + # to reset them using tools like rtctl, skip those to + # avoid sched_setscheduler/chrt to fail + if iskthread(pid) and not name.startswith("migration/"): rtprio = int(proc[pid]["stat"]["rt_priority"]) try: policy = schedutils.get_scheduler(pid) |