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.
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>