Skip to content

Affinity devel and fixes

John Kacur linux-rt-users 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6rt-tests: cyclictest: Set errno to 0 before call to mlocksrc/cyclictest/cyclictest.c+1 -20 replies
2/6rt-tests: cyclictest: Report all errors from pthread_setaffinity_npsrc/cyclictest/cyclictest.c+1 -10 replies
3/6rt-tests: cyclictest: Fix parsing affinity with a space and a leading zerosrc/cyclictest/cyclictest.c+1 -10 replies
4/6rt-tests: cyclictest: Fix parsing affinity with leading exclamation marksrc/cyclictest/cyclictest.c+1 -10 replies
5/6rt-tests: cyclictest: Only run on available cpus according to the affinitysrc/cyclictest/cyclictest.c+36 -30 replies
6/6rt-tests: cyclictest: Only run on runtime affinity and user supplied affinitysrc/cyclictest/cyclictest.c+32 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] Affinity devel and fixes

These are changes to improve affinity on cyclictest

There are some fixes to the parsing of -a CPUSET that occurred in a few exceptional instances.

Also, cyclictest was written as if it owned the whole machine. So before these changes we would run on all cpus or on the CPUSET that the user passed with the command line option even if those cpus were not in the CPUSET from the affinity in the runtime environment. These changes here fix that. For example,

Before the changes
taskset 4-7 cyclictest -t -a 1-6
the taskset 4-7 would only apply to the main cyclictest thread, and then the 1-6 would only apply to every newly created thread.

After the changes
taskset 4-7 cyclictest -t -a 1-6
Now, 4-7 still applies to the main thread, but all newly created threads run on the interesection of the cpus 4-7 and 1-6, in other words on 4,5 and 6

In addition if the user doesn't pass and affinity with the command line option, the runtime environment is respected.

For example

Before
taskset 0-4 cyclictest -t
Only the main cyclictest thread would run on cpus 0-4 and the other threads could run on any cpu

After
taskset 0-4 cyclictest -t
All cyclictest threads run on 0-4

John Kacur (6):
rt-tests: cyclictest: Set errno to 0 before call to mlock
rt-tests: cyclictest: Report all errors from pthread_setaffinity_np
rt-tests: cyclictest: Fix parsing affinity with a space and a leading
zero
rt-tests: cyclictest: Fix parsing affinity with leading exclamation
mark
rt-tests: cyclictest: Only run on available cpus according to the
affinity
rt-tests: cyclictest: Only run on runtime affinity and user supplied
affinity

 src/cyclictest/cyclictest.c | 78 +++++++++++++++++++++++++++++++++----
 1 file changed, 71 insertions(+), 7 deletions(-)
Signature · 1 line
2.20.1