1
0
Fork 0
Commit graph

869 commits

Author SHA1 Message Date
Evgeni Golov
de1a6ab536 change Source in spec file to github 2017-04-26 18:45:06 +02:00
Jaroslav Škarvada
68ca252841 Merge pull request #36 from evgeni/test-fixes
profile units are OrderedDicts, not lists
2017-04-26 18:22:55 +02:00
Jaroslav Škarvada
d661dc36b2 Merge pull request #34 from evgeni/pkg-config
try to get unitdir and tmpdir from pkg-config
2017-04-26 18:17:13 +02:00
Jaroslav Škarvada
320a704232 Merge pull request #37 from olysonek/plugin_net_pr
plugin_net: Implement setting 'pause' and 'ring' parameters
2017-04-26 18:15:29 +02:00
Jaroslav Škarvada
c322cd25c1 Merge pull request #39 from olysonek/tuned_adm
List available profiles on 'tuned-adm profile'
2017-04-26 17:56:23 +02:00
Jaroslav Škarvada
0e37280609 Merge pull request #40 from evgeni/manpages
fix NF/FI macros in manpages
2017-04-26 17:05:06 +02:00
Jaroslav Škarvada
12b4e8174f Merge pull request #41 from evgeni/spelling
fix a few spelling errors in the manpages
2017-04-26 17:02:50 +02:00
Jaroslav Škarvada
23654b0e75 Merge pull request #42 from evgeni/desktop-file
drop the encoding keyword from the desktop file
2017-04-26 17:00:57 +02:00
Jaroslav Škarvada
584f2d5c03 Merge pull request #43 from evgeni/systemd-unit-doc
add Documentation entry to tuned.service
2017-04-26 16:59:34 +02:00
Jaroslav Škarvada
de880346fa
new release (2.8.0)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-26 16:55:04 +02:00
Evgeni Golov
9683aae7a4 add Documentation entry to tuned.service 2017-04-22 15:50:01 +02:00
Evgeni Golov
0a2cfd4b4d drop the encoding keyword from the desktop file
it's deprecated:
 https://specifications.freedesktop.org/desktop-entry-spec/1.0/apc.html
2017-04-22 15:09:21 +02:00
Evgeni Golov
77e4ccb1b6 fix a few spelling errors in the manpages
spotted by Debian's lintian tool
2017-04-22 15:06:41 +02:00
Evgeni Golov
1353a22ca2 fix NF/FI macros in manpages
the macros are called .nf and .fi, not .NF and .FI

Test:
    % LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80  man --warnings \
      -E UTF-8 -l -Tutf8 -Z <file> >/dev/null
    <standard input>:53: warning: macro `NF' not defined
    <standard input>:74: warning: macro `FI' not defined

Spotted by rpmlint and lintian.
2017-04-22 10:12:03 +02:00
Ondřej Lysoněk
82997069b4 List available profiles on 'tuned-adm profile'
List available profiles when 'tuned-adm profile' is run
without a profile name.

Resolves: rhbz#988433

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-04-21 16:43:55 +02:00
Ondřej Lysoněk
2d83889c7b plugin_net: Implement setting 'ring' parameters
Plugin_net instances can now be given a new 'ring' option with
the following values (see ethtool(8) for their meaning):
rx N
rx-mini N
rx-jumbo N
tx N

The syntax is the same as the syntax for 'coalesce' and 'features'
parameters introduced in commit bc5d7acca8.

Example:
[net]
ring=rx 1024 tx 512

Resolves: https://github.com/redhat-performance/tuned/issues/2

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-04-18 13:56:36 +02:00
Ondřej Lysoněk
2d9a445d44 plugin_net: Implement setting 'pause' parameters
Plugin_net instances can now be given a new 'pause' option with
the following values (see ethtool(8) for their meaning):
autoneg on|off
rx on|off
tx on|off

The syntax is the same as the syntax for 'coalesce' and 'features'
parameters introduced in commit bc5d7acca8.

Example:
[net]
pause=autoneg off rx off

Resolves: https://github.com/redhat-performance/tuned/issues/2

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-04-18 13:56:36 +02:00
Ondřej Lysoněk
7c818982f8 plugin_net: Refactor
Refactor plugin_net to make its future extension easier.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-04-18 13:56:36 +02:00
Evgeni Golov
24fad6bbea fix empty DeviceMatcher rules 2017-04-18 12:17:55 +02:00
Evgeni Golov
7f087627ef move DeviceMatcher to hardware 2017-04-18 12:17:42 +02:00
Evgeni Golov
7aafbccb32 profile units are OrderedDicts, not lists
refs #35
2017-04-18 11:53:53 +02:00
Evgeni Golov
cd17eaec8c try to get unitdir and tmpdir from pkg-config
pkg-config is the most reliable and cross-distro way to get
information about the systemd folders on a system.
only rely on RPM macros when pkg-config is not installed or
systemd.pc is not available.
2017-04-18 10:26:48 +02:00
Jaroslav Škarvada
f180a80013
bootloader: workaround for adding tuned_initrd to new kernels on restart
This will add tuned_initrd to newly installed kernels upon Tuned
restart. It's workaround for rhbz#1442117.

Resolves: rhbz#1441797

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-14 00:02:34 +02:00
Jaroslav Škarvada
8c34b7384e
builtin functions: add strip
The strip functions makes string from all arguments and
expands to its stripped version.

Also used in the cpu-partitioning profile to strip output
of the 'mktemp -d' command.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-13 23:23:58 +02:00
Jaroslav Škarvada
8cde3e1b3c
cpu-partitioning: use tuna for cores isolation
Users can switch to Tuned if they need process blacklisting
(i.e. marking of processes which are allowed to run on
isolated cores). This will be very probably made the default
in next Tuned release.

Related: rhbz#1403309

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-13 21:51:46 +02:00
Jaroslav Škarvada
c7e40efb74 Merge pull request #33 from olysonek/execute_fix
plugin_net: Fix invocation of execute()
2017-04-13 15:55:19 +02:00
Ondřej Lysoněk
da630790ef plugin_net: Fix invocation of execute()
Fix an invocation of execute() after its API changed.

Reproducer:
Run tuned with the following profile, and you'll see error messages
'tuned.utils.commands: Executing ethtool error: ethtool: bad command line argument(s)'
in the log. Replace 'enp0s25' with your ethernet interface:

[net]
devices=enp0s25
coalesce=rx-usecs 4

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-04-13 15:38:44 +02:00
Jaroslav Škarvada
191785a054
scheduler: fix more python-linux-procfs tracebacks
Fixes traceback if the queried process disappears.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-12 16:27:53 +02:00
Jaroslav Škarvada
cdefe91ee1
scheduler: do not traceback if process dissapears during enumeration
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-12 15:52:52 +02:00
Jaroslav Škarvada
3023c9e860
systemd: added support for older systemd CPUAffinity syntax
Older systemd (systemd-219 tested) doesn't support commas as delimiters.
It also doesn't support ranges (e.g. 2-5). So always write unpacked
CPU list and use spaces as delimiters. Also fixed possible traceback
in case /etc/systemd/system.conf is empty (it's unlikely to happen).

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-11 19:28:59 +02:00
Jaroslav Škarvada
94b7fdd41d
builtin functions: parser not traceback if func expands to empty string
Fixes the following:
[variables]
v=${f:f1:}

if 'f1' expands to empty string it doesn't traceback now.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-11 17:27:43 +02:00
Jaroslav Škarvada
e8f42a2c3f
bootloader: improved regex for /boot location detection
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-11 16:08:03 +02:00
Jaroslav Škarvada
8442dabf54
bootloader: work with /boot which is not on separate partition
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-11 15:40:05 +02:00
Jaroslav Škarvada
ac78f90c77
scheduler: added support for cores isolation
Plugin scheduler now can do cores isolation on its own, Tuna is
not needed for it, e.g.:

[scheduler]
isolated_cores=2-4
ps_blacklist=.*pmd.*;.*PMD.*;^DPDK;.*qemu-kvm.*

It will isolate cores 2-4, it will ignore processes which matched
ps_blacklist regexes. Multiple regexes can be separated by ';'.
Quoted semicolon, i.e. '\;' is taken literally.

It also supports 'ps_whitelist' which is by default set to '.*'.

It takes all processes which matches ps_whitelist than it removes
those which matches ps_blacklist and move them out of the
isolated_cores. When the profile is unloaded it allows all matching
processes to run on all cores.

It changes processes affinities, threads affinities, IRQs affinities
and it sets default_smp_affinity for IRQs.

Also cpu-partitioning profile has been switched from Tuna to this
mechanism.

Resolves: rhbz#1403309

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-07 17:46:32 +02:00
Jaroslav Škarvada
244917ec41
unit: options are processed in the order there were defined
Now all units (e.g. [variables]) preserve order of options, e.g.
[variables]
c=1
b=${c}
a=${b}

The ${a} now correctly expands to '1' and not to '${b}'.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-06 10:56:18 +02:00
Jaroslav Škarvada
c4c7387978
builtin functions: fixed parser to correctly skip quoted vars / funcs
Now it skips:
\${VAR}
\${f:FUNC}

Instead of:
\${f:FUNC\}

This second form is now not supported.

Also simplified the parser.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-06 10:50:09 +02:00
Jaroslav Škarvada
a1b9e60644
builtin functions: added virt_check function and support expansion in include
The virt_check builtin function expands to the first argument if
running inside virtual machine, otherwise it expands to the second
argument (when on bare metal or in case of error). It uses virt-what
as a backend.

So now the following can be used to lower fragmentation of Tuned profiles:

[main]
include=virtual-${f:virt_check:guest:host}

So it will include virtual-guest if running inside virtual machine,
otherwise it includes virtual-host.

Resolves: rhbz#1426654

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-04 15:11:45 +02:00
Jaroslav Škarvada
9a9afb6ef6
builtin functions: improved parser
Parser rewritten to use pushdown automaton, now it can correctly parse
e.g. the following:

[variables]
cores1=2-5
isolated_cores=${f:cpulist_pack:${f:cpulist_unpack:${cores1}}},${f:cpulist_unpack:6-8}

I.e. nested functions are no problem now, multiple functions on the same
level also works and it correctly skips unexpanded variables. It's also
possible to prevent function expansion by escaping:

v=\${f:f1\}

Variables expansion could be now probably also moved to this automaton and
all could be expanded in one step, but for now keeping it as is (i.e. two
steps expansion).

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-04 13:52:51 +02:00
Jaroslav Škarvada
b2cc6189f8
profiles: consolidated summaries
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-03 22:52:18 +02:00
Jaroslav Škarvada
76e7805276
man: updated tuned-main.conf manual page
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-03 18:21:38 +02:00
Jaroslav Škarvada
0e7933ff0b
variables: support inheritance of variables
resolves: rhbz#1374168

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-03 17:01:13 +02:00
Jaroslav Škarvada
df9aa2f5c4
With systemd don't do full rollback on shutdown / reboot
With systemd full rollback is done if Tuned is terminated by user or profile
is changed. It is not done if Tuned is terminated due to system
shutdown / reboot. Without systemd full rollback is done only if profile
is changed.

Renamed profile_switch parameter to full_rollback where appropriate.

Also fixed various checks for command not found.

Resolves: rhbz#1421286

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-04-01 12:36:43 +02:00
Jaroslav Škarvada
b0984ed4e3
nfv: improved wording in readme of nfv trampoline package
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-03-31 10:44:02 +02:00
Jaroslav Škarvada
35e803ae0c
spec: relaxed tight profile dependencies
There is no need for profiles to requires exact NVR of the engine,
or other profiles, relaxed it to NV (i.e. only name, version requirement,
but no release requirement).

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-03-30 17:45:28 +02:00
Jaroslav Škarvada
a952845bf1
desktop: fixed typo in profile summary
Resolves: rhbz#1421238

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-03-30 17:00:26 +02:00
Jaroslav Škarvada
ad8af6aa12
bootloader: do not uninstall initrd if not previously installed
It fixes traceback when unapplying bootloader plugin tunig and there
is no initrd specified.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-03-30 16:44:54 +02:00
Jaroslav Škarvada
1a100c9c7b
profiles: fixed assert for unset isolated_cores
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-03-30 16:29:49 +02:00
Jaroslav Škarvada
9e2b240ffb
assert_non_equal: fixed condition
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-03-30 16:22:26 +02:00
Jaroslav Škarvada
6c3fd2b79e
profiles: added check for unset isolated_cores
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-03-30 16:14:06 +02:00
Jaroslav Škarvada
1623ac4a85
assertion_non_equal: improved logging for better readability
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-03-30 16:09:53 +02:00