diff --git a/SOURCES/CLI-fix-traceback-where-enter-p-policy-without-prio.patch b/SOURCES/CLI-fix-traceback-where-enter-p-policy-without-prio.patch new file mode 100644 index 0000000..fe8ce0c --- /dev/null +++ b/SOURCES/CLI-fix-traceback-where-enter-p-policy-without-prio.patch @@ -0,0 +1,47 @@ +From 9ac6c7acac23cf8d2311f1f066d2e17b808a1101 Mon Sep 17 00:00:00 2001 +From: Petr Oros +Date: Wed, 4 Dec 2013 08:27:15 +0000 +Subject: [PATCH] CLI: fix traceback where enter -p policy without prio + +commit 443234bd24c794068a752d567bb7f4d903fbbaac upstream +Bugzilla: 1035794 + +Tuna throwing value error when not specified priority. +Example: tuna -t PID_OF_SOME_PROCESS -p OTHER +Here "other" not priority, but scheduler policy. +For RR and FIFO default 1. For OTHER and BATCH default 0. +After patch apply, tuna use first part of string as policy and remaining part as priority. +All unacceptable values cause exception in schedutils library and tuna show error + +Tested-by: Jiri Kastner +Signed-off-by: Petr Oros +Signed-off-by: Jiri Kastner +Signed-off-by: John Kacur +--- + tuna/tuna.py | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/tuna/tuna.py b/tuna/tuna.py +index 6dfe740..0feb521 100755 +--- a/tuna/tuna.py ++++ b/tuna/tuna.py +@@ -490,10 +490,14 @@ def thread_set_priority(tid, policy, rtprio): + + def threads_set_priority(tids, parm, affect_children = False): + parms = parm.split(":") ++ rtprio = 0 + policy = None +- if len(parms) != 1: ++ if parms[0].upper() in ["OTHER", "BATCH", "IDLE", "FIFO", "RR"]: + policy = schedutils.schedfromstr("SCHED_%s" % parms[0].upper()) +- rtprio = int(parms[1]) ++ if len(parms) > 1: ++ rtprio = int(parms[1]) ++ elif parms[0].upper() in ["FIFO", "RR"]: ++ rtprio = 1 + else: + rtprio = int(parms[0]) + +-- +1.8.1.4 + diff --git a/SOURCES/tuna-modified-sysctl-settings-in-example.conf.patch b/SOURCES/tuna-modified-sysctl-settings-in-example.conf.patch new file mode 100644 index 0000000..bfa5894 --- /dev/null +++ b/SOURCES/tuna-modified-sysctl-settings-in-example.conf.patch @@ -0,0 +1,112 @@ +From 9c9f25a7a6c2541ca4a0719d27900409b9fa7282 Mon Sep 17 00:00:00 2001 +From: Petr Oros +Date: Tue, 4 Feb 2014 08:51:07 +0100 +Subject: [PATCH] tuna: modified sysctl settings in example.conf + +Signed-off-by: Petr Oros +Signed-off-by: Jiri Kastner +Signed-off-by: John Kacur +--- + etc/tuna/example.conf | 72 +++++++++++++++++++++++++++------------------------ + 1 file changed, 38 insertions(+), 34 deletions(-) + +diff --git a/etc/tuna/example.conf b/etc/tuna/example.conf +index 7448a4e..96e3a00 100644 +--- a/etc/tuna/example.conf ++++ b/etc/tuna/example.conf +@@ -1,54 +1,58 @@ + #List of enabled categories + [categories] +-kernel=Kernel scheduler +-vm=VM +-ipv4=Network IPv4 +-ipv6=Network IPv6 +-net=Network Core ++kernel = Kernel scheduler ++vm = VM ++ipv4 = Network IPv4 ++ipv6 = Network IPv6 ++net = Network Core + + [kernel] +-kernel.sched_latency_ns=1000,50000000, +-kernel.sched_min_granularity_ns=,, +-kernel.sched_nr_migrate=0,128, +-kernel.sched_rt_period_us=,, +-kernel.sched_rt_runtime_us= 1000,2000000, +-kernel.sched_tunable_scaling=0,10, +-kernel.sched_wakeup_granularity_ns=1000,10000000, ++kernel.sched_latency_ns = 1000,50000000, ++kernel.sched_min_granularity_ns = ,, ++kernel.sched_nr_migrate = 0,128, ++kernel.sched_rt_period_us = ,, ++kernel.sched_rt_runtime_us = 1000,2000000, ++kernel.sched_tunable_scaling = 0,10, ++kernel.sched_wakeup_granularity_ns = 1000,20000000, ++kernel.sched_migration_cost_ns = ,, ++kernel.sched_autogroup_enabled = 0,1, + kernel.core_pattern = ++kernel.sem = + + [vm] +-vm.dirty_ratio=0,100, +-vm.dirty_writeback_centisecs=,, +-vm.dirty_expire_centisecs=,, +-vm.laptop_mode=0,5, +-vm.swappiness =0,100, ++vm.dirty_ratio = 0,100, ++vm.dirty_background_ratio = ,, ++vm.dirty_writeback_centisecs = ,, ++vm.dirty_expire_centisecs = ,, ++vm.laptop_mode = 0,5, ++vm.swappiness = 0,100, ++vm.max_map_count = ,, + vm.memory_failure_early_kill = 0,1,0 + + [net] +-net.core.rmem_default=100000,1000000, +-net.core.rmem_max=100000,1000000, +-net.core.wmem_default=100000,1000000, +-net.core.wmem_max=100000,1000000, ++net.core.rmem_default = 100000,1000000, ++net.core.rmem_max = 100000,1000000, ++net.core.wmem_default = 100000,1000000, ++net.core.wmem_max = 100000,1000000, + + [ipv4] +-net.ipv4.tcp_window_scaling= +-net.ipv4.conf.all.forwarding=0,1, +-net.ipv4.conf.all.rp_filter= +-net.ipv4.tcp_congestion_control= +-net.ipv4.tcp_max_syn_backlog= +-net.ipv4.tcp_mem= +-net.ipv4.tcp_slow_start_after_idle=0,1, +-net.ipv4.tcp_window_scaling=0,1, ++net.ipv4.tcp_window_scaling = 0,1, ++net.ipv4.conf.all.forwarding = 0,1, ++net.ipv4.conf.all.rp_filter = ++net.ipv4.tcp_congestion_control = ++net.ipv4.tcp_max_syn_backlog = ++net.ipv4.tcp_mem = ++net.ipv4.tcp_slow_start_after_idle = 0,1, + + [ipv6] +-net.ipv6.conf.*.forwarding=0,1, ++net.ipv6.conf.*.forwarding = 0,1, + + #special section for gui alias + [guiAlias] +-net.ipv4=ipv4 +-net.ipv6=ipv6 +-net.core=core ++net.ipv4 = ipv4 ++net.ipv6 = ipv6 ++net.core = core + + #special section for this file description + [fileDescription] +-text=This file contain some features for tunning kernel params.Mainly this is example file for demonstrate tuna new features. Params are set as default or most uses value ++text = This file contain some features for tunning kernel params.Mainly this is example file for demonstrate tuna new features. Params are set as default or most uses value +-- +1.8.1.4 + diff --git a/SPECS/tuna.spec b/SPECS/tuna.spec index a24f175..e7fe35a 100644 --- a/SPECS/tuna.spec +++ b/SPECS/tuna.spec @@ -3,7 +3,7 @@ Name: tuna Version: 0.11.1 -Release: 4%{?dist} +Release: 6%{?dist} License: GPLv2 Summary: Application tuning GUI & command line utility Group: Applications/System @@ -12,6 +12,9 @@ Patch1: spec-Mark-configuration-files-with-config.patch Patch2: git-housekeeping-Add-the-.gitattributes-file.patch Patch3: CLI-fix-ps_show_thread-call-with-bad-args-count.patch Patch4: spec-Show-where-the-original-source-comes-from-in-co.patch +Patch5: tuna-modified-sysctl-settings-in-example.conf.patch +Patch6: CLI-fix-traceback-where-enter-p-policy-without-prio.patch + URL: http://userweb.kernel.org/~acme/tuna/ # Real source is now at git://git.kernel.org/pub/scm/utils/tuna/tuna BuildArch: noarch @@ -54,6 +57,8 @@ priority is changed, be it using tuna or plain chrt & taskset. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 %build %{__python} setup.py build @@ -106,6 +111,14 @@ rm -rf %{buildroot} %doc docs/oscilloscope+tuna.pdf %changelog +* Tue Mar 10 2014 John Kacur - 0.11.1-6 +- tuna-modified-sysctl-settings-in-example.conf (1031582) +- CLI-fix-traceback-where-enter-p-policy-without-prio (1035794) +Resolves: rhbz#1035794 + +* Fri Dec 27 2013 Daniel Mach - 0.11.1-5 +- Mass rebuild 2013-12-27 + * Thu Nov 07 2013 John Kacur - 0.11.1-4 - tuna: Do polkit auth for GUI BZ:919212,974027 (996885) - tuna: Auto Correction for config file errors (1015062)