linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Schwender <schwenderjonathan@gmail.com>
To: "Ahmed S. Darwish" <a.darwish@linutronix.de>
Cc: jkacur@redhat.com, williams@redhat.com, linux-rt-users@vger.kernel.org
Subject: Re: rt-tests: cyclictest: Add option to specify main pid affinity
Date: Mon, 22 Feb 2021 18:05:02 +0100	[thread overview]
Message-ID: <b29fdf4c-788f-d1c4-06bf-60f7f1bdef7b@gmail.com> (raw)
In-Reply-To: <YDPZ0xrEcsS5SfWh@lx-t490>

On 2/22/21 5:20 PM, Ahmed S. Darwish wrote:
> On Mon, Feb 22, 2021 at 04:28:30PM +0100, Jonathan Schwender wrote:
>> 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

  reply	other threads:[~2021-02-22 17:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 15:28 rt-tests: cyclictest: Add option to specify main pid affinity Jonathan Schwender
2021-02-22 15:28 ` [PATCH 0/2] " Jonathan Schwender
2021-02-22 15:28 ` [PATCH 1/2] cyclictest: Move main pid setaffinity handling into a function Jonathan Schwender
2021-02-23  5:12   ` John Kacur
2021-02-22 15:28 ` [PATCH 2/2] cyclictest: Add --mainaffinity=[CPUSET] option Jonathan Schwender
2021-02-22 16:20 ` rt-tests: cyclictest: Add option to specify main pid affinity Ahmed S. Darwish
2021-02-22 17:05   ` Jonathan Schwender [this message]
2021-03-21 17:11   ` Jonathan Schwender
2021-03-23 16:51     ` John Kacur
2021-03-24  9:32     ` Ahmed S. Darwish
2021-03-29 14:37       ` Jonathan Schwender

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b29fdf4c-788f-d1c4-06bf-60f7f1bdef7b@gmail.com \
    --to=schwenderjonathan@gmail.com \
    --cc=a.darwish@linutronix.de \
    --cc=jkacur@redhat.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).