linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jassi Brar <jassisinghbrar@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	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: Fri, 15 May 2020 11:46:29 -0500	[thread overview]
Message-ID: <CABb+yY1wJMzakpz0h6ZxAh4Z3OB718f+Wq3RP0R4NZ_U=vRMkw@mail.gmail.com> (raw)
In-Reply-To: <0a50f0cf5593baeb628dc8606c523665e5e2ae6c.1589519600.git.viresh.kumar@linaro.org>

On Fri, May 15, 2020 at 12:17 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> - The hardware gives us the capability to write the register in
>   parallel, i.e. we can write 0x800 and 0x400 together without any
>   software locks, and so these 32 bits should be considered as separate
>   channel even if only one interrupt is issued by the hardware finally.
>   This shouldn't be called as virtualization of the channels, as the
>   hardware supports this (as clearly mentioned in the TRM) and it takes
>   care of handling the signal properly.
>
I'll leave this one open to bikeshed arguments.

> - With serialization, if we use only one channel as today at every
>   priority, if there are 5 requests to send signal to the receiver and
>   the dvfs request is the last one in queue (which may be called from
>   scheduler's hot path with fast switching), it unnecessarily needs to
>   wait for the first four transfers to finish due to the software
>   locking imposed by the mailbox framework. This adds additional delay,
>   maybe of few ms only, which isn't required by the hardware but just by
>   the software and few ms can be important in scheduler's hotpath.
>
As I asked you yesterday over the call, it may help if you could share
some numbers to back up the doomsday scenario.
I don't believe mailbox will be a bottleneck, unless you send commands
in a while(1) ... but even then you have to compare against the
virtual-channel implementation. (Not to forget one usually doesn't
need/want the dvfs, power, clock, hotplug all happening at the _same_
time)

Please note, SCMI... lets not pretend it is not about making scmi work
with mhu :) ...  itself uses shared-memory transfers and
wait_for_completion_timeout  in scmi_do_xfer().   If some platform
_really-really_ faced speed bottlenecks, it would come to want to
exchange 32-bit encoded command/response over the mhu register,
asynchronously and totally bypassing shmem... which is possible only
now.


> - With the current approach it isn't possible to assign different bits
>   (or doorbell numbers) to clients from DT and the only way of doing
>   that without adding new bindings is by extending #mbox-cells to accept
>   a value of 2 as done in this patch.
>
I am afraid you are confused. You can use bit/doorbell-6 by passing
0x40 to mhu as the data to send.

Cheers!

  reply	other threads:[~2020-05-15 16:46 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 [this message]
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
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='CABb+yY1wJMzakpz0h6ZxAh4Z3OB718f+Wq3RP0R4NZ_U=vRMkw@mail.gmail.com' \
    --to=jassisinghbrar@gmail.com \
    --cc=arnd@arndb.de \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sudeep.holla@arm.com \
    --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).