On Tue, Feb 13, 2024 at 9:49 AM yfliu2008 <yfliu2...@qq.com.invalid> wrote:

> Dear Xiang and Bowen,
>
>
>
>
> Hope you've had a pleasant spring festival.&nbsp;
>
>
>
>
> As for RPTUN, I have it basically&nbsp; work using share memory only,
> though not very efficient but it has less hardware dependencies. I even can
> mount master's file system and run programs&nbsp; from it on the remote
> node, as the remote node's capability is superset of that of the master
> node.
>
>
>
>
>
> Here I have some questions regarding RPTUN:
>
>
>
>
>
> How to judge if RPTUN state is ready? For example when can a remote node
> know it is time to mount a folder at master side? Should we refer to the
> "rproc.state" inside rptun device?
>

There are two concept about the readiness:
1.the virtio/rpmsg transport, which is defined by "device status":

https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html#x1-110001
2.The services on top of virtio/rpmsg, which is controlled by individual
service. For example, all rpmsgfs fs operation will block until the remote
side ready:

https://github.com/apache/nuttx/blob/master/fs/rpmsgfs/rpmsgfs_client.c#L278-L283

So, rproc.state just only means the transport is ready for communication.


>
>
> How does the lifecycle of RPTUN remote node look like?
>
>
it's defined by virtio spec:
https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html
https://www.kernel.org/doc/Documentation/remoteproc.txt


>
> What is the meaning for reset? is this for the remote side to gracefully
> restart itself? master side shall also reset the shared memory after
> getting ACK?
>
>
reset may happen in two situation:

   1. The remote reset by self
   2. The master request the remote reset

But it's very hard to restore the state the same as before resetting.


> What is the menaing for panic? is it to tell remote node that master side
> encountered panic situation and the remote node should live on their own
> from now on?
>
>
No, panic is used to notify the remote to dump the internal status and
shutdown self.


> How can master tell the remote to get prepared for shutdown? This gives
> chance for the remote node to flush any file system cache and notify the
> master.
>

using a new id of mailbox or IPI.


>
>
> How&nbsp; can master tell the remote to go standby or wake up?
>
>
the remote core should go to standby byself as before, the same interrupt
used for normal ipc can be reused to wake up the remote


> Is the&nbsp; lifecycle management mostly done by in-band communications?
> It feels natural to have in-band administrative communication channel for
> lifecycle management purposes, though for some rare cases additional
> mechanisms are needed at master side like kicking off or powering down the
> remote. However,&nbsp; I saw some samples uses inter-processor interrupts
> for reset or panic, which confused me a lot because some back-n-forth
> message exchanges are needed to handle lifecycle gracefully, this is
> improper and unnecessary for interrupts.
>
>
It depends on the hardware design. It's better to have the special hardware
design to notify the lifecycle(e.g. reset, low power) event, otherwise the
software on peer core need send the special IPI or mailbox IRQ manually.


>
>
>
>
> Regards,
> yf
>
>
>
>
>
>
>
>
>
>
>
>
> &nbsp;

Reply via email to