Question about IPI interrupt handler

Yuxin Ren ryx at gwmail.gwu.edu
Wed Aug 6 01:00:02 CEST 2014


Hi All,

I cannot understand the logic of the IPI interrupt handler very well.
I hope someone can help me.
Thanks a lot.
I am using intel IA32 multi core cpu.
My scenario is one client and one server thread on different core. Client
sends simple data-only IPC to the server.

1. The function Thread::handle_remote_requests_irq is the IPI interrupt
handler, right?
    So it is running within the interrupt context?

If so,
2. In this function, the variable "c" is set to the current Context. On the
server core, when the server is blocked(waiting for IPC), what is
current Context? The server thread or the idle thread?
     I have no other threads in the user level, and I assume there are no
background threads in the kernel or L4Re. In addition, I guess each thread
associates with a Context.

If my assumptions are right and that current Context is idle thread,
3.  At the last of this function, it calls c->handle_drq(). But when does
the server thread's handle_drq() is called?

4.  In what situation, the variable "resched" will be set to true?

When it is true,
5. c->schedule() will be called, does it mean that we can switch to another
thread in the interrupt context?
    It cannot make sense to me.

Thanks again.

Best,
Yuxin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20140805/2c162609/attachment-0001.html>


More information about the l4-hackers mailing list