From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>,
linux-arm-kernel@lists.infradead.org,
Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux@ew.tq-group.com
Subject: Re: [PATCH 1/2] spi: dt-bindings: introduce linux,use-rt-queue flag
Date: Fri, 09 Jun 2023 11:13:39 +0200 [thread overview]
Message-ID: <4784636.LvFx2qVVIh@steina-w> (raw)
In-Reply-To: <CACRpkda2yQefuUMn6Ot8Ns6nNgfC25i9nwmzwxOy5fUg=A44hQ@mail.gmail.com>
Am Freitag, 9. Juni 2023, 10:42:04 CEST schrieb Linus Walleij:
> On Fri, Jun 9, 2023 at 10:15 AM Alexander Stein
>
> <alexander.stein@ew.tq-group.com> wrote:
> > > A agree with Mark that a command line option isn't that bad. It's
> > > something
> > > that pertains to just the Linux kernel after all? And you can put that
> > > command line option in the default device tree, in chosen, if you want.
> >
> > I don't like the idea of a command line enabling realtime scheduling for
> > all instances of the SPI controller driver or even all SPI controllers.
> > Actually this might be worse if a non-rt SPI bus is considered for RT
> > scheduling. IMHO this should be configurable per SPI controller,
>
> OK that's a fair point.
>
> I don't think command line arguments are necessarily global by
> nature, AFAIK it's fine to invent something like pl022.4.rt_sched=1
> where 4 is the instance number. Parsing it is just code.
Now we are touching the topic of non-deterministic device names/numbers. This
gets worse if your SPI controller is attached to some other device, although
RT capabilities are rather limited in that case anyway.
> > e.g. a sysfs attribute.
>
> But it needs to be set before userspace is up :/
Does it? IMHO a realtime system is allowed to use blocking mechanism (e.g.
dynamic memory allocatin and so on) during startup/configuration phase,
ignoring any deadlines.
Once it starts operating this is a no-go.
This seems rather similar to configure scheduling priority for IRQ threads on
RT preempt systems. IIRC according to RT folks, this is considered an
administration task, thus the responsibility of userspace.
> I fully sympathize with this problem, because I have faced
> similar problems myself.
You mean RT-scheduling before userspace is up? Can you elaborate the issues
you see?
> My fallback solution for this driver would be to keep using the
> old DT property (which was merged when reviewing was
> not as strict) if that works, or use undocumented DT properties,
> it's not the end of the world but does leave the bad taste of
> a work not finished.
I was surprised to see the driver specific property for configuring RT sched
as well. I assume the intention of this series is to support this feature for
other SPI controller drivers as well. So some kind of feature has to be added
anyway.
Best regards,
Alexander
> Yours,
> Linus Walleij
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
next prev parent reply other threads:[~2023-06-09 9:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 11:52 [PATCH 1/2] spi: dt-bindings: introduce linux,use-rt-queue flag Matthias Schiffer
2023-06-02 11:52 ` [PATCH 2/2] spi: add support for generic " Matthias Schiffer
2023-06-02 12:22 ` [PATCH 1/2] spi: dt-bindings: introduce " Mark Brown
2023-06-06 14:37 ` Linus Walleij
2023-06-06 14:44 ` Mark Brown
2023-06-07 12:55 ` Matthias Schiffer
2023-06-07 14:21 ` Mark Brown
2023-06-07 14:28 ` Krzysztof Kozlowski
2023-06-09 7:41 ` Linus Walleij
2023-06-09 8:15 ` Alexander Stein
2023-06-09 8:42 ` Linus Walleij
2023-06-09 9:13 ` Alexander Stein [this message]
2023-06-09 9:22 ` Linus Walleij
2023-06-09 9:34 ` Mark Brown
2023-06-09 9:33 ` Mark Brown
2023-06-14 19:30 ` Rob Herring
2023-06-14 19:59 ` Linus Walleij
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=4784636.LvFx2qVVIh@steina-w \
--to=alexander.stein@ew.tq-group.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux@ew.tq-group.com \
--cc=matthias.schiffer@ew.tq-group.com \
--cc=robh+dt@kernel.org \
/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