Thread (11 messages) 11 messages, 3 authors, 2021-03-29

Re: rt-tests: cyclictest: Add option to specify main pid affinity

From: Jonathan Schwender <hidden>
Date: 2021-02-22 17:05:49

On 2/22/21 5:20 PM, Ahmed S. Darwish wrote:
On Mon, Feb 22, 2021 at 04:28:30PM +0100, Jonathan Schwender wrote:
quoted
Hi John,

This patch adds the option --mainaffinity to specify the affinity of
the main pid.
This is mainly useful if you want to bind the main thread to a
different (e.g. housekeeping ) CPU than the measurement threads.
Pardon my ignorance; can you please specify why is this important?
The measurement threads have an RT priority while the main thread is
SCHED_OTHER. So why would the cyclictest measurements really be affected
by the main thread (unless there's a preempt_rt bug)?
The option is intended for measuring on isolated CPUs (via isolcpus or 
cpusets).

The RT wiki cyclictest FAQ entry "How can the influence of Cyclictest be 
minimized when evaluating latencies on an isolated set of CPUs?" [1]  
recommends to pin the main thread to a non-isolated CPU since
that reduces context switches.

[1] 
https://wiki.linuxfoundation.org/realtime/documentation/howto/tools/cyclictest/faq

Do you also have any numbers showing different results with/without
"--mainaffinity"?
  Sorry, I don't have any numbers, but I've put it on my todo-list.
Thanks,

--
Ahmed S. Darwish
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help