Question about cross core IPC
ryx at gwmail.gwu.edu
Wed Jun 4 17:48:44 CEST 2014
Thank you for your reply. But I think you misunderstand my questions.
First, my question is whether there is a lock.
Are you sure there is no lock for sender_list?
I think the data has to be manipulated by multiple context
as we can send to the same receiver at the same time in different cores.
Of course there may be not lock even for multicore, but I do not think only
interrupt is enough.
If there is no lock, I want to know how they do cross core synchronization
Second, IPI operations are useful for me. But I also want to know the code
path to use IPI. Can you tell me where is the code on IPC path to invoke
Thanks so much.
On Tue, Jun 3, 2014 at 5:57 PM, Adam Lackorzynski <adam at os.inf.tu-dresden.de
> On Sun Jun 01, 2014 at 05:15:06 -0800, Yuxin Ren wrote:
> > I am learning the IPC code in the Fiasco kernel. I have some questions
> > If the receiver is not ready, we will add the sender to the sender_list.
> > But I did find any lock to protect the sender_list. So if two threads at
> > different cores try to add themselves to the sender_list at the same
> > how can we guarantee the we are safe to do so?
> So if there's no lock then the data structure will only ever be
> manipulated by a single context (and preemption disabled as required).
> > When sender and receiver are at different cores, we have to use IPI to
> > communicate. Where is the code on IPC path to use IPI? I imagine the code
> > around IPI should be complex, so it is great if someone can tell me the
> > logic about it, especially about how we protect data structures, using
> > locks or any other lock-free algorithm.
> Ipi is the base class that implements IPI functionality. So for example
> see for Ipi::send in context.cpp. Around that are functions that allow
> to call functions on remote cores etc, also in context.cpp.
> Adam adam at os.inf.tu-dresden.de
> Lackorzynski http://os.inf.tu-dresden.de/~adam/
> l4-hackers mailing list
> l4-hackers at os.inf.tu-dresden.de
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the l4-hackers