linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Wagner <dwagner@suse.de>
To: John Kacur <jkacur@redhat.com>
Cc: Clark Williams <williams@redhat.com>, linux-rt-users@vger.kernel.org
Subject: Re: [rt-tests v1 0/6] libnuma cleanups for cyclictest
Date: Fri, 18 Dec 2020 17:41:11 +0100	[thread overview]
Message-ID: <20201218164111.i4v55ld5vyyj2uzb@beryllium.lan> (raw)
In-Reply-To: <68c0b159-9460-4041-ba65-9cbc28b6a842@redhat.com>

Hi John,

On Fri, Dec 18, 2020 at 10:57:22AM -0500, John Kacur wrote:
> On Fri, 18 Dec 2020, Daniel Wagner wrote:
> 
> > As we have a hard dependency on libnuma we can simplify the code in
> > cyclictest. This allows remove all the small helpers in rt_numa.h. And
> > with this we can remove the header and reduce the confusion with
> > rt-numa.h
> 
> This is why I asked you to keep numa functions separate from any common
> library. The reason the file exists, is in the past I had two versions
> of each numa function, one for architectures that supported libnuma, and
> empty wrapper versions for ones that didn't.

This is what I figured as well. So with the decission to have the
dependency on libnuma a lot of things can be simplified.

> There are two buts. The first one, is that I see the other programs in
> the test suite that mimic cyclictest behaviour are getting more attention,
> so I could imagine as we try to strengthen their behaviour that we could
> add numa support to these programs as well.

Indeed, this is what I hand in mind too. Parsing the --affinity string
should be done with the libnuma. One thing we could try to achieve is to
common parser options so that we only have one function for it. Not sure
if this would be possible though.

> The other but, is that I'm
> seeing the need recently to add support for a lot of architectures that
> we didn't care so much about in the past, and not all of them have libnuma
> so we might want to do the same trick as in the past, add wrapper versions
> in a header file.

I am sure with rt getting closer to mainline there will be more interest
in the tests. I'd say we should rather get libnuma supported on those
architectures instead of trying to work around here. Debian says
libnuma is available on

 - alpha
 - amd64
 - arm64
 - armel
 - armhf
 - hppa
 - i386
 - m68k
 - mips64el
 - mipsel
 - ppc64
 - ppc64el
 - riscv64
 - s390x
 - sh4
 - sparc64
 - x32

Which architectures is missing?

> So I propose, we take your patches to get rid of the file, because it will
> clean things up a lot, but then we may have to go back to creating 
> something like the rt_numa.h file anew. Removing rt_numa.h first is good 
> though, because if we don't have to create it anew the code has been 
> cleaned-up, and if we do recreate it from scratch, it will be better for 
> having cleaned-up how numa works in cyclictest

Yes, that was my whole indent of this series. First to cleanup the
current rt-numa.h code as much as possible before we adding new stuff.

> This is also an example of something that was evoling in exactly this
> direction. When Thomas wrote cyclictest, it made sense to have smp, but if
> I were to rewrite everything from scratch I wouldn't have it there.

That's why I opted to make '-a' a bit more powerful :)

> Note also that smp isn't just a kind of hardware for cyclictest, you
> can still see this is the help - it gathered up the -a and -t options
> and put all threads at the same prio.

This hasn't changed. So you can place N threads evenly placed on the
provided cpumask. Not sure why I want to have more threads on the CPU,
but well, it's supported.

> So, thanks again for doing this. A word of warning I spent a long
> time fiddling with affinity to make it finally work correctly, so
> I'm going to test the sh*t out of your changes to make sure they don't 
> break anything before I accept them.

Please test it carefully. I tried not to breaks it but I wouldn't be
surprised you find something.

> A final comment, the idea of an "unstable" devel branch,
> the "unstable" refers not to the code being iffy, but to the fact
> that I wanted developers to feel free to break the old API, and not be
> constrained with backwards compatability, so as you clean this stuff-up
> if you want to remove -S, it's fine with me. Hopefully if we take away
> anything that users want they'll yell at us, but I think we're pretty
> careful about necessary functionality. Maybe after things are cleaned-up
> we will have to add a new flag to specify the same prio for all
> threads?

IIRC, Debian was not particular happy with the option getting dropped
within a major version. So it's not just rtval using it. Also there is
LAVA's test-definitions (which I use) but this shouldn't be a real
problem as it's easy to update.

Though as said, distros are not happy if we change the existing
options. Given that it's not a real burden to keep -S around I would
just cary around until we have a real need for it to go.

> I think I'll spin off a new version of rt-tests before accepting this
> set of patches.

Good idea!

Thanks,
Daniel

  reply	other threads:[~2020-12-18 16:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 14:19 [rt-tests v1 0/6] libnuma cleanups for cyclictest Daniel Wagner
2020-12-18 14:19 ` [rt-tests v1 1/6] cyclictest: Always use libnuma Daniel Wagner
2020-12-18 14:19 ` [rt-tests v1 2/6] cyclictest: Use numa API directly Daniel Wagner
2020-12-18 14:19 ` [rt-tests v1 3/6] cyclictest: Use affinity_mask for stearing thread placement Daniel Wagner
2021-01-26  5:39   ` John Kacur
2021-01-26  8:41     ` Daniel Wagner
2021-01-26 16:33       ` John Kacur
2021-01-26 17:13         ` Daniel Wagner
2020-12-18 14:19 ` [rt-tests v1 4/6] cyclictest: Mimik --smp behavior with --affinity Daniel Wagner
2021-01-26  5:55   ` John Kacur
2021-01-26  8:37     ` Daniel Wagner
2021-01-26 16:32       ` John Kacur
2021-01-26 17:13         ` Daniel Wagner
2020-12-18 14:19 ` [rt-tests v1 5/6] cyclictest: Simplify --smp vs --affinity vs --threads argument logic Daniel Wagner
2020-12-18 14:19 ` [rt-tests v1 6/6] cyclictest: Move verbose message into main Daniel Wagner
2020-12-18 14:41 ` [rt-tests v1 0/6] libnuma cleanups for cyclictest Daniel Wagner
2020-12-18 16:02   ` John Kacur
2020-12-18 16:43     ` Daniel Wagner
2020-12-18 15:57 ` John Kacur
2020-12-18 16:41   ` Daniel Wagner [this message]
2020-12-22 17:26   ` Alison Chaiken
2020-12-22 18:04     ` John Kacur

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=20201218164111.i4v55ld5vyyj2uzb@beryllium.lan \
    --to=dwagner@suse.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).