Bug 1292537

Summary: Tuna is not moving threads away from isolated (-i) CPUs.
Product: Red Hat Enterprise Linux 6 Reporter: John Kacur <jkacur>
Component: tunaAssignee: John Kacur <jkacur>
Status: CLOSED ERRATA QA Contact: Jiri Kastner <jkastner>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.8CC: bhu, daolivei, jkacur, jkastner, jshortt, network-qe
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1286221 Environment:
Last Closed: 2016-05-10 20:54:06 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:
Bug Depends On: 1286221    
Bug Blocks: 1270066, 1282960    

Description John Kacur 2015-12-17 17:38:16 UTC
+++ This bug was initially created as a clone of Bug #1286221 +++

Description of problem:

Tuna is not moving threads away from isolated (-i) CPUs.

Version-Release number of selected component (if applicable):
tuna-0.11.1-10.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1. Isolate some CPUs using tuna. For example, on a 4 CPUs box isolate the CPUs
2 and 3.

# tuna -c 2,3 -i

2. Check the cpumask of all threads of a threaded application. For example, on
a RHEL7, check the cpumask of tuned's threads:

# ps -eLo lwp,comm | grep " tuned"  | while read lwp comm; do taskset -p $lwp; done

Actual results:
Only the threads with the same PID/TID has the correct cpumask (excluding
isolated CPUs). For example:

# ps -eLo lwp,comm | grep " tuned"  | while read lwp comm; do taskset -p $lwp; done
pid 761's current affinity mask: 3
pid 820's current affinity mask: f
pid 822's current affinity mask: f
pid 829's current affinity mask: f


Expected results:
All threads with the correct cpumask (excluding isolated CPUs) set. For example

# ps -eLo lwp,comm | grep " tuned"  | while read lwp comm; do taskset -p $lwp; done
pid 761's current affinity mask: 3
pid 820's current affinity mask: 3
pid 822's current affinity mask: 3
pid 829's current affinity mask: 3

Additional info:
tuna-0.11.1-8.el7.noarch works fine.

--- Additional comment from Daniel Bristot de Oliveira on 2015-11-27 14:30:33 EST ---

Upstream patch commit:

https://git.kernel.org/cgit/utils/tuna/tuna.git/commit/?id=95c4e2ad2603cd29af1357c0ceb780da8dc161cc

Comment 1 John Kacur 2015-12-18 15:38:25 UTC
Fixed in tuna-0.12-3.el6 and up

Comment 5 errata-xmlrpc 2016-05-10 20:54:06 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://rhn.redhat.com/errata/RHBA-2016-0807.html