Linux-remoteproc Archive mirror
 help / color / mirror / Atom feed
From: Andrew Davis <afd@ti.com>
To: Hari Nagalla <hnagalla@ti.com>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	Nick Saulnier <nsaulnier@ti.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: <linux-remoteproc@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 13/13] mailbox: omap: Remove kernel FIFO message queuing
Date: Mon, 1 Apr 2024 18:50:37 -0500	[thread overview]
Message-ID: <e172edd3-824b-4ee4-b650-be1a8b9286fd@ti.com> (raw)
In-Reply-To: <761aa56f-55c4-e0d4-9f75-eef8035aa25b@ti.com>

On 4/1/24 6:39 PM, Hari Nagalla wrote:
> On 3/25/24 12:20, Andrew Davis wrote:
>> The kernel FIFO queue has a couple issues. The biggest issue is that
>> it causes extra latency in a path that can be used in real-time tasks,
>> such as communication with real-time remote processors.
>>
>> The whole FIFO idea itself looks to be a leftover from before the
>> unified mailbox framework. The current mailbox framework expects
>> mbox_chan_received_data() to be called with data immediately as it
>> arrives. Remove the FIFO and pass the messages to the mailbox
>> framework directly.
> Yes, this would definitely speed up the message receive path. With RT linux, the irq runs in thread context, so that is Ok. But with non-RT the whole receive path runs in interrupt context. So, i think it would be appropriate to use a threaded_irq()?

I was thinking the same at first, but seems some mailbox drivers use threaded, others
use non-threaded context. Since all we do in the IRQ context anymore is call
mbox_chan_received_data(), which is supposed to be IRQ safe, then it should be fine
either way. So for now I just kept this using the regular IRQ context as before.

If that does turn out to be an issue then let's switch to threaded.

Andrew

      reply	other threads:[~2024-04-01 23:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 17:20 [PATCH 00/13] OMAP mailbox FIFO removal Andrew Davis
2024-03-25 17:20 ` [PATCH 01/13] mailbox: omap: Remove unused omap_mbox_{enable,disable}_irq() functions Andrew Davis
2024-03-25 17:20 ` [PATCH 02/13] mailbox: omap: Remove unused omap_mbox_request_channel() function Andrew Davis
2024-03-25 17:20 ` [PATCH 03/13] mailbox: omap: Move omap_mbox_irq_t into driver Andrew Davis
2024-03-25 17:20 ` [PATCH 04/13] mailbox: omap: Move fifo size check to point of use Andrew Davis
2024-03-25 17:20 ` [PATCH 05/13] mailbox: omap: Remove unneeded header omap-mailbox.h Andrew Davis
2024-03-25 17:20 ` [PATCH 06/13] mailbox: omap: Remove device class Andrew Davis
2024-03-25 17:20 ` [PATCH 07/13] mailbox: omap: Use devm_pm_runtime_enable() helper Andrew Davis
2024-03-25 17:20 ` [PATCH 08/13] mailbox: omap: Merge mailbox child node setup loops Andrew Davis
2024-03-25 17:20 ` [PATCH 09/13] mailbox: omap: Use function local struct mbox_controller Andrew Davis
2024-03-25 17:20 ` [PATCH 10/13] mailbox: omap: Use mbox_controller channel list directly Andrew Davis
2024-03-25 17:20 ` [PATCH 11/13] mailbox: omap: Remove mbox_chan_to_omap_mbox() Andrew Davis
2024-03-25 17:20 ` [PATCH 12/13] mailbox: omap: Reverse FIFO busy check logic Andrew Davis
2024-04-01 23:31   ` Hari Nagalla
2024-04-01 23:47     ` Andrew Davis
2024-03-25 17:20 ` [PATCH 13/13] mailbox: omap: Remove kernel FIFO message queuing Andrew Davis
2024-04-01 23:39   ` Hari Nagalla
2024-04-01 23:50     ` Andrew Davis [this message]

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=e172edd3-824b-4ee4-b650-be1a8b9286fd@ti.com \
    --to=afd@ti.com \
    --cc=andersson@kernel.org \
    --cc=hnagalla@ti.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=nsaulnier@ti.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 read-only IMAP folder(s) and NNTP newsgroup(s).