From: Sudeep Holla <sudeep.holla@arm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
Jassi Brar <jassisinghbrar@gmail.com>,
Rob Herring <robh@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Sudeep Holla <sudeep.holla@arm.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
Devicetree List <devicetree@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] dt-bindings: mailbox: add doorbell support to ARM MHU
Date: Tue, 8 Sep 2020 14:26:26 +0100 [thread overview]
Message-ID: <20200908132602.GA27241@bogus> (raw)
In-Reply-To: <CAK8P3a0nVOR7YYSZaKmzm3WsUZLgOqL7yZq+f0Dfnn2=16AkLA@mail.gmail.com>
On Tue, Sep 08, 2020 at 11:14:50AM +0200, Arnd Bergmann wrote:
> Picking up the old thread again after and getting pinged by multiple
> colleagues about it (thanks!) reading through the history.
>
> On Fri, Jun 12, 2020 at 7:29 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> >
> > On 11-06-20, 19:34, Jassi Brar wrote:
> > > In the first post in this thread, Viresh lamented that mailbox
> > > introduces "a few ms" delay in the scheduler path.
> > > Your own tests show that is certainly not the case -- average is the
> > > same as proposed virtual channels 50-100us, the best case is 3us vs
> > > 53us for virtual channels.
> >
> > Hmmm, I am not sure where is the confusion here Jassi. There are two
> > things which are very very different from each other.
> >
> > - Time taken by the mailbox framework (and remote for acknowledging
> > it) for completion of a single request, this can be 3us to 100s of
> > us. This is clear for everyone. THIS IS NOT THE PROBLEM.
> >
> > - Delay introduced by few of such requests on the last one, i.e. 5
> > normal requests followed by an important one (like DVFS), the last
> > one needs to wait for the first 5 to finish first. THIS IS THE
> > PROBLEM.
>
> Earlier, Jassi also commented "Linux does not provide real-time
> guarantees", which to me is what actually causes the issue here:
>
> Linux having timeouts when communicating to the firmware means
> that it relies on the hardware and firmware having real-time behavior
> even when not providing real-time guarantees to its processes.
>
> When comparing the two usage models, it's clear that the minimum
> latency for a message delivery is always at least the time time
> to process an interrupt, plus at least one expensive MMIO read
> and one less expensive posted MMIO write for an Ack. If we
> have a doorbell plus out-of-band message, we need an extra
> DMA barrier and a read from coherent memory, both of which can
> be noticeable. As soon as messages are queued in the current
> model, the maximum latency increases by a potentially unbounded
> number of round-trips, while in the doorbell model that problem
> does not exist, so I agree that we need to handle both modes
> in the kernel deal with all existing hardware as well as firmware
> that requires low-latency communication.
>
> It also sounds like that debate is already settled because there
> are platforms using both modes, and in the kernel we usually
> end up supporting the platforms that our users have, whether
> we think it's a good idea or not.
>
Thanks for the nice summary of the discussion so far.
> The only questions that I see in need of being answered are:
>
> 1. Should the binding use just different "#mbox-cells" values or
> also different "compatible" strings to tell that difference?
I initially proposed latter, but Rob preferred the former which
makes sense for the reasons you have mentioned below.
> 2. Should one driver try to handle both modes or should there
> be two drivers?
>
> It sounds like Jassi strongly prefers separate drivers, which
> would make separate compatible strings the more practical
> approach.
Indeed.
> While the argument can be made that a single
> piece of hardware should only have one DT description,
> the counter-argument would be that the behavior described
> by the DT here is made up by both the hardware and the
> firmware behind it, and they are in fact different.
>
I am too fine either way.
--
Regards,
Sudeep
next prev parent reply other threads:[~2020-09-08 18:28 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 5:17 [RFC] dt-bindings: mailbox: add doorbell support to ARM MHU Viresh Kumar
2020-05-15 16:46 ` Jassi Brar
2020-05-18 7:35 ` Viresh Kumar
2020-05-19 0:53 ` Jassi Brar
2020-05-19 4:39 ` Viresh Kumar
2020-05-19 1:29 ` Bjorn Andersson
2020-05-19 3:40 ` Viresh Kumar
2020-05-19 4:05 ` Jassi Brar
2020-06-03 18:31 ` Sudeep Holla
2020-06-03 18:42 ` Jassi Brar
2020-06-03 18:28 ` Sudeep Holla
2020-05-28 19:20 ` Rob Herring
2020-05-29 4:07 ` Viresh Kumar
2020-06-03 18:04 ` Sudeep Holla
2020-06-03 18:17 ` Sudeep Holla
2020-06-04 5:59 ` Viresh Kumar
2020-06-04 8:28 ` Sudeep Holla
2020-06-03 18:32 ` Jassi Brar
2020-06-04 9:20 ` Sudeep Holla
2020-06-04 15:15 ` Jassi Brar
2020-06-05 4:56 ` Sudeep Holla
2020-06-05 6:30 ` Jassi Brar
2020-06-05 8:58 ` Sudeep Holla
2020-06-05 15:42 ` Jassi Brar
2020-06-10 9:33 ` Viresh Kumar
2020-06-11 10:00 ` Sudeep Holla
2020-06-12 0:34 ` Jassi Brar
2020-06-12 5:28 ` Viresh Kumar
2020-09-08 9:14 ` Arnd Bergmann
2020-09-08 9:27 ` Viresh Kumar
2020-09-08 13:26 ` Sudeep Holla [this message]
2020-09-09 3:23 ` Jassi Brar
2020-09-09 4:46 ` Viresh Kumar
2020-09-09 9:31 ` Sudeep Holla
2020-05-29 5:20 ` Jassi Brar
2020-05-29 6:27 ` Viresh Kumar
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=20200908132602.GA27241@bogus \
--to=sudeep.holla@arm.com \
--cc=arnd@arndb.de \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=jassisinghbrar@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.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;
as well as URLs for NNTP newsgroup(s).