Bug 1259043 - realtime profile: set unboud workqueues cpumask
realtime profile: set unboud workqueues cpumask
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tuned (Show other bugs)
7.2
Unspecified Unspecified
high Severity unspecified
: rc
: ---
Assigned To: Jaroslav Škarvada
Tereza Cerna
: ZStream
: 1251255 (view as bug list)
Depends On:
Blocks: kvm-rt-tuned 1273048 1282566
  Show dependency treegraph
 
Reported: 2015-09-01 16:09 EDT by Luiz Capitulino
Modified: 2016-11-04 03:24 EDT (History)
10 users (show)

See Also:
Fixed In Version: tuned-2.5.1-5.el7
Doc Type: Enhancement
Doc Text:
Feature: Set the unbound workqueues cpumask to the list of non-isolated cores for the real-time profiles. Reason: The latest RHEL and RT kernels got support for setting the cpumask of unbound workqueues in sysfs, thus we need support for it in the Tuned Realtime profile. Result: Unbound workqueues cpumask is now set to the list of non-isolated cores in the real-time profiles.
Story Points: ---
Clone Of:
: 1282566 (view as bug list)
Environment:
Last Closed: 2016-11-04 03:24:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Luiz Capitulino 2015-09-01 16:09:19 EDT
Description of problem:

The latest RHEL and RT kernels got support for setting the cpumask of unbound workqueues in sysfs. For more details, see:

 Bug 1176155 - unbound worker affinity control to be submitted upstream & then backported to RHEL

This patch sets the unbound workqueues cpumask to the list of non-isolated cores for the real-time profiles.

I don't know if this will improve latency numbers as we didn't have any issues with workqueues in the recent past, but it's a good setting to have.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---

PS: As far as I could understand the workqueues code, it should be safe
    to drop the writeback cpumask setting line. However, if I do that,
    the writeback cpumask will read "ffff" which either looks like a bug
    in the kernel code or I'm wrong about the global cpumask taking care
    of the writeback workqueue. I'll check this soon, meanwhile I'm not
    dropping working config

 profiles/realtime/tuned.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/profiles/realtime/tuned.conf b/profiles/realtime/tuned.conf
index f552818..8688057 100644
--- a/profiles/realtime/tuned.conf
+++ b/profiles/realtime/tuned.conf
@@ -20,6 +20,7 @@ vm.stat_interval = 10
 
 [sysfs]
 /sys/bus/workqueue/devices/writeback/cpumask = ${not_isolated_cpumask}
+/sys/devices/virtual/workqueue/cpumask = ${not_isolated_cpumask}
 /sys/devices/system/machinecheck/machinecheck*/ignore_ce = 1
 
 [bootloader]
Comment 1 Jaroslav Škarvada 2015-10-06 07:42:53 EDT
(In reply to Luiz Capitulino from comment #0)
Thanks, pushed upstream:
https://git.fedorahosted.org/cgit/tuned.git/commit/?id=5a5986bd8bf2db1136b62f168db9255dba1b7a42
Comment 4 Jaroslav Škarvada 2015-11-11 09:27:09 EST
*** Bug 1251255 has been marked as a duplicate of this bug. ***
Comment 7 Tereza Cerna 2016-08-24 03:23:39 EDT
==============================================
Verified in:
    tuned-2.7.1-2.el7.noarch
    tuned-profiles-realtime-2.7.1-2.el7.noarch
PASS
==============================================

# cat /sys/devices/virtual/workqueue/cpumask
ff
# cat /usr/lib/tuned/realtime/tuned.conf 
...
[sysfs]
/sys/bus/workqueue/devices/writeback/cpumask = ${not_isolated_cpumask}
/sys/devices/virtual/workqueue/cpumask = ${not_isolated_cpumask}
/sys/devices/system/machinecheck/machinecheck*/ignore_ce = 1
...
# cat /etc/tuned/realtime-variables.conf 
isolated_cores=0
# tuned-adm profile realtime
# cat /sys/devices/virtual/workqueue/cpumask
0e

==============================================
Reproduced in:
    tuned-2.5.1-1.el7.noarch
    tuned-profiles-realtime-2.5.1-1.el7.noarch
FAIL
==============================================

# cat /usr/lib/tuned/realtime/tuned.conf 
...
[sysfs]
/sys/bus/workqueue/devices/writeback/cpumask = ${not_isolated_cpumask}
/sys/devices/system/machinecheck/machinecheck*/ignore_ce = 1
...
Comment 9 errata-xmlrpc 2016-11-04 03:24:37 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2479.html

Note You need to log in before you can comment on or make changes to this bug.