linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Affinity devel and fixes
@ 2020-03-02 21:44 John Kacur
  2020-03-02 21:44 ` [PATCH 1/6] rt-tests: cyclictest: Set errno to 0 before call to mlock John Kacur
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: John Kacur @ 2020-03-02 21:44 UTC (permalink / raw)
  To: rt-users; +Cc: Clark Williams, John Kacur

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(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-03-02 21:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02 21:44 [PATCH 0/6] Affinity devel and fixes John Kacur
2020-03-02 21:44 ` [PATCH 1/6] rt-tests: cyclictest: Set errno to 0 before call to mlock John Kacur
2020-03-02 21:44 ` [PATCH 2/6] rt-tests: cyclictest: Report all errors from pthread_setaffinity_np John Kacur
2020-03-02 21:44 ` [PATCH 3/6] rt-tests: cyclictest: Fix parsing affinity with a space and a leading zero John Kacur
2020-03-02 21:44 ` [PATCH 4/6] rt-tests: cyclictest: Fix parsing affinity with leading exclamation mark John Kacur
2020-03-02 21:44 ` [PATCH 5/6] rt-tests: cyclictest: Only run on available cpus according to the affinity John Kacur
2020-03-02 21:44 ` [PATCH 6/6] rt-tests: cyclictest: Only run on runtime affinity and user supplied affinity John Kacur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).