From: Jonathan Schwender <schwenderjonathan@gmail.com>
To: John Kacur <jkacur@redhat.com>
Cc: williams@redhat.com, linux-rt-users@vger.kernel.org
Subject: Re: [PATCH v4 1/2] cyclictest: Move main pid setaffinity handling into a function
Date: Sat, 22 May 2021 09:35:19 +0200 [thread overview]
Message-ID: <b0da72ea-b7d3-5212-e042-cc9e12fa7e8d@gmail.com> (raw)
In-Reply-To: <755ca9b1-b3c3-806f-95e0-b12a87d9448d@redhat.com>
Am 21.05.2021 um 22:19 schrieb John Kacur:
> How about set_thread_affinity() since you want to use the function
> for the main thread plus other threads.
>
>> +static void set_main_thread_affinity(struct bitmask *cpumask)
>> +{
>> + int res;
>> +
>> + errno = 0;
>> + res = numa_sched_setaffinity(getpid(), cpumask);
>> + if (res != 0)
>> + warn("Couldn't setaffinity in main thread: %s\n",
>> + strerror(errno));
>> +}
>> +
>>
Actually, I only intended to use this for the main thread.
I didn't touch the affinity setting of the timerthreads (and don't see a
need to).
I'm not familiar with the whole cyclictest code and all options. Did you
have
any specific threads in mind that also use numa_sched_setaffinity() and
could
use this function?
Maybe you got that impression from the previous v3 iteration, where I
moved the functionality
to rt_numa and added a parameter for the pid/tid. My motivation there
was mainly,
that if I'm moving it into a library, then I should probably add a
parameter for the pid to the function
in case someone has a usecase for that.
next prev parent reply other threads:[~2021-05-22 7:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 8:37 [PATCH v4 0/2] rt-tests: cyclictest: Add option to specify main pid affinity Jonathan Schwender
2021-05-18 8:37 ` [PATCH v4 1/2] cyclictest: Move main pid setaffinity handling into a function Jonathan Schwender
2021-05-21 20:19 ` John Kacur
2021-05-22 7:35 ` Jonathan Schwender [this message]
2021-05-18 8:37 ` [PATCH v4 2/2] cyclictest: Add --mainaffinity=[CPUSET] option Jonathan Schwender
2021-05-19 15:55 ` Daniel Wagner
2021-05-22 8:13 ` Jonathan Schwender
2021-05-21 20:21 ` John Kacur
2021-05-21 20:24 ` John Kacur
2021-05-22 7:57 ` 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=b0da72ea-b7d3-5212-e042-cc9e12fa7e8d@gmail.com \
--to=schwenderjonathan@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.