rcub task affinity allows isolated cpus

Bug #1992201 reported by Jim Somerville
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Jim Somerville

Bug Description

Brief Description
-----------------
The rcub task has affinity which allows it onto isolated cpus.

There is an upstream linux kernel commit which fixes this by removing nohz_full cpus from the task
affinity. This will work for us since isolated cpus are also marked as nohz_full.

Severity
--------
Minor, but the rcub task can steal precious cpu time away from kworker tasks on isolated cpus.

Steps to Reproduce
------------------
Boot an rt (lowlat) kernel, check the affinity of the rcub task(s). eg:
ps -efww | grep rcub
taskset -p 14 (if the above showed task 14 is rcub)

Expected Behavior
------------------
The affinity of rcub does not include nohz_full cpus

Actual Behavior
----------------
The affinity of rcub includes all cpus.

Reproducibility
---------------
100%

System Configuration
--------------------
Anything lowlat

Branch/Pull Time/Commit
-----------------------
N/A

Last Pass
---------
This problem has been there since day one AFAICT

Timestamp/Logs
--------------
Don't need

Test Activity
-------------
Doesn't matter

Workaround
----------
Not required, but one can always manually change a task's affinity with taskset command.

Changed in starlingx:
assignee: nobody → Jim Somerville (jsomervi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kernel (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/kernel/+/860750

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kernel (master)

Reviewed: https://review.opendev.org/c/starlingx/kernel/+/860750
Committed: https://opendev.org/starlingx/kernel/commit/f85a7fc271b95e35a81a8e6c69d49445b9fd54a1
Submitter: "Zuul (22348)"
Branch: master

commit f85a7fc271b95e35a81a8e6c69d49445b9fd54a1
Author: Jim Somerville <email address hidden>
Date: Fri Oct 7 16:30:40 2022 -0400

    rcu: Avoid running boost kthreads on isolated CPUs

    Problem:
    The rcub tasks are allowed to run on isolated CPUs. This
    is a two-fold problem. The first is that these rcub tasks
    steal precious yielded CPU time away from kworker
    tasks that need to run on the isolated cpu. The second
    is that they interfere with nohz_full behavior.

    Solution:
    This is already solved for us upstream, so we simply
    backport the patch here. It affines the rcub tasks
    away from any nohz_full cpus. Note that even though
    this issue only pertains to our rt kernel, we also
    apply the patch to the std kernel for completeness.

    Verification:
    - Boot rt kernel without this patch applied, and check the
    affinity of the rcub tasks. They are set to run on any
    cpu, even the nohz_full ones.
    - Boot rt kernel with this patch included, and now see that
    the nohz_full cpus are excluded from rcub affinity.

    Closes-Bug: 1992201

    Signed-off-by: Jim Somerville <email address hidden>
    Change-Id: I53cbfeddcd7c89b17bd7465134c02311caa7914f

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.8.0 stx.distro.other
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.