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.
This bug was initially created as a copy of Bug #2050242
Description of problem:
If a new affinity is requested we currently calculate a cpumask that is the intersection of the set of the newly requested affinity and the runtime or inherited cpumask.
While this makes sense in some circumstances, such as if the requester wants to add '+' or take away '!' from the current set.
This doesn't make sense if a new affinity is requested and is too restrictive. It can result in no cpus being available for example when isolcpus has been applied.
How to Test:
You can use taskset to set the runtime environment that cyclictest will inherit, and then use the -a flag to alter it in cyclictest.
For example
Before this change
taskset --cpu-list 0-4,8 ./cyclictest -t -a 0,3-6
# /dev/cpu_dma_latency set to 0us
policy: other/other: loadavg: 2.26 2.23 2.52 4/2349 16998
T: 0 (16262) P: 0 I:1000 C: 550911 Min: 3 Act: 52 Avg: 61 Max: 26423
T: 1 (16263) P: 0 I:1500 C: 362514 Min: 3 Act: 52 Avg: 83 Max: 27363
T: 2 (16264) P: 0 I:2000 C: 273451 Min: 3 Act: 52 Avg: 82 Max: 28608
The runtime environment consists of cpus 0,1,2,3,4,8
the requested affinity includes cpus 0,3,4,5,6
The Intersection of those cpus is 0,3,4 - so therefore we get just 3 threads as you can see above.
You can also use taskset -p pid, to examine the cpumasks but this is a bit complicated for the purpose here and not necessary.
After the change we get
taskset --cpu-list 0-4,8 ./cyclictest -t -a 0,3-6
# /dev/cpu_dma_latency set to 0us
policy: other/other: loadavg: 2.48 2.30 2.54 1/2351 17291
T: 0 (17286) P: 0 I:1000 C: 3985 Min: 4 Act: 52 Avg: 58 Max: 1818
T: 1 (17287) P: 0 I:1500 C: 2643 Min: 5 Act: 52 Avg: 68 Max: 13469
T: 2 (17288) P: 0 I:2000 C: 1991 Min: 6 Act: 53 Avg: 59 Max: 3206
T: 3 (17289) P: 0 I:2500 C: 1592 Min: 7 Act: 53 Avg: 56 Max: 2521
T: 4 (17290) P: 0 I:3000 C: 1329 Min: 6 Act: 53 Avg: 69 Max: 2766
So the requested affinity includes cpus 0,3,4,5,6 or 5 threads which is what we see above.
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 (new packages: realtime-tests), 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-2022:2498