Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1550573

Summary: cpu-partitioning: variable no_rebalance_cores doesn't work
Product: Red Hat Enterprise Linux 7 Reporter: Tereza Cerna <tcerna>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Tereza Cerna <tcerna>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: jeder, jskarvad, olysonek
Target Milestone: rcKeywords: Patch, Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tuned-2.10.0-0.1.rc1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 10:50:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tereza Cerna 2018-03-01 13:44:35 UTC
Description of problem:
=======================

This is new bug for problem found in:
  https://bugzilla.redhat.com/show_bug.cgi?id=1497182#c19

Currently there are mentioned in /etc/tuned/cpu-partitioning-variables.conf:

  # isolated_cores=2,4-7
  # isolated_cores=2-23
  #
  # To disable the kernel load balancing in certain isolated CPUs:
  # no_rebalance_cores=5-10

but if user uses no_rebalance_cores variable, feature doesn't work. But if he uses no_balance_cores, it works.

There are two options:

  1] Name of 'no_rebalance_cores' variable in /etc/tuned/cpu-partitioning-
     variables.conf is wrong and we need to modify this file to:

      # To disable the kernel load balancing in certain isolated CPUs:
      # no_balance_cores=5-10

  2] Name of 'no_rebalance_cores' is right and it is necessary to modify code
     for using this variable.

Version-Release number of selected component (if applicable):
=============================================================
tuned-2.9.0-1.el7 

Steps to Reproduce:
===================
Use 'no_rebalance_cores' variable:

# cat /etc/tuned/cpu-partitioning-variables.conf
isolated_cores=1-3
no_rebalance_cores=2
# tuned-adm profile cpu-partitioning
# reboot

# cat /run/tuned/no-rebalance-cpus.txt 
#
# cat /proc/sys/kernel/sched_domain/cpu0/domain*/flags
559
4143
# cat /proc/sys/kernel/sched_domain/cpu1/domain*/flags
559
4143
# cat /proc/sys/kernel/sched_domain/cpu2/domain*/flags
559
4143
# cat /proc/sys/kernel/sched_domain/cpu3/domain*/flags
559
4143

Expected results:
=================
When I used 'no_balance_cores' variable, it works:

# cat /etc/tuned/cpu-partitioning-variables.conf
isolated_cores=1-3
no_balance_cores=2
# tuned-adm profile cpu-partitioning
# reboot

# cat /run/tuned/no-rebalance-cpus.txt 
2
# cat /proc/sys/kernel/sched_domain/cpu0/domain*/flags
559
4143
# cat /proc/sys/kernel/sched_domain/cpu1/domain*/flags
559
4143
# cat /proc/sys/kernel/sched_domain/cpu2/domain*/flags
558
4142
# cat /proc/sys/kernel/sched_domain/cpu3/domain*/flags
559
4143

Comment 2 Jaroslav Škarvada 2018-03-01 13:48:10 UTC
I fixed the comment yesterday in:
https://github.com/redhat-performance/tuned/commit/280ac3d3f942b13a59fe9362bfcd2214c08574cf

because I think it's typo, but let's wait for conclusion in bug 1497182.

Comment 3 Ondřej Lysoněk 2018-03-01 14:12:18 UTC
(In reply to Jaroslav Škarvada from comment #2)
> because I think it's typo, but let's wait for conclusion in bug 1497182.

Number of occurences of 'balance': 6
Number of occurences of 'rebalance': 9

I would hardly call that a typo, rather an inconsistency.

Comment 4 Jaroslav Škarvada 2018-03-01 14:58:39 UTC
Luiz, the original author of the feature, seems to agree with keeping the 'no_balance_cores'.

My opinion is that the fix of the comment is not worth the z-stream, so moving to 7.6. Feel free to propose if your opinion vary.

Comment 6 Tereza Cerna 2018-03-12 09:54:58 UTC
Info for QE:
============

According to previous discussion in this bug and BZ#1497182, variable name is finally "no_balance_cores" and all occurences of "rebalance" is fixed in:
 * https://github.com/redhat-performance/tuned/commit/280ac3d3f942b13a59fe9362bfcd2214c08574cf
 * https://github.com/redhat-performance/tuned/commit/d76dc3d62bdd6cf77b51ef2722a69b062f61e195

Comment 8 Tereza Cerna 2018-07-25 11:17:55 UTC
======================================================
Verified in:
    tuned-2.10.0-1.el7.noarch
    tuned-profiles-cpu-partitioning-2.10.0-1.el7.noarch
PASS
======================================================

# cat /etc/tuned/cpu-partitioning-variables.conf 
# Examples:
# isolated_cores=2,4-7
# isolated_cores=2-23
#
# To disable the kernel load balancing in certain isolated CPUs:
# no_balance_cores=5-10                                            !!!! RIGHT HELP !!!!

# echo "isolated_cores=1-3" > /etc/tuned/cpu-partitioning-variables.conf 
# echo "no_balance_cores=2" >> /etc/tuned/cpu-partitioning-variables.conf 

# tuned-adm profile cpu-partitioning

# reboot

# cat /run/tuned/no-balance-cpus.txt                               !!!! FILE EXISTS !!!!
2

# cat /proc/sys/kernel/sched_domain/cpu1/domain*/flags
559
4143
# cat /proc/sys/kernel/sched_domain/cpu2/domain*/flags             !!!! FUNCTIONALITY WORKS !!!!
558
4142
# cat /proc/sys/kernel/sched_domain/cpu3/domain*/flags
559
4143

======================================================
Reproduced in:
    tuned-2.9.0-1.el7.noarch
    tuned-profiles-cpu-partitioning-2.9.0-1.el7.noarch
FAIL
======================================================

# cat /etc/tuned/cpu-partitioning-variables.conf 
# Examples:
# isolated_cores=2,4-7
# isolated_cores=2-23
#
# To disable the kernel load balancing in certain isolated CPUs:
# no_rebalance_cores=5-10                                !!!! WRONG DIRECTIVE !!!!

# echo "isolated_cores=1-3" > /etc/tuned/cpu-partitioning-variables.conf 
# echo "no_rebalance_cores=2" >> /etc/tuned/cpu-partitioning-variables.conf 

# tuned-adm profile cpu-partitioning

# reboot

# cat /run/tuned/no-rebalance-cpus.txt                   !!!! NOT EXISTING FILE !!!!

# cat /proc/sys/kernel/sched_domain/cpu1/domain*/flags
559
4143
# cat /proc/sys/kernel/sched_domain/cpu2/domain*/flags   !!!! FUNCTIONALITY DON'T WORK !!!!
559
4143
# cat /proc/sys/kernel/sched_domain/cpu3/domain*/flags
559
4143

Comment 10 errata-xmlrpc 2018-10-30 10:50:19 UTC
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://access.redhat.com/errata/RHBA-2018:3172