Event Channel Semantics
Hello,
I am developing some userspace tools on Xen/Linux and have problems regarding the semantics of /dev/linux/evtchn. The situation is as follows:
Suppose client A allocates an unbound port.
Client B connects to this via bind_interdomain.
Client A reads on /dev/linux/evtchn to see whether it has been notified.
If client B now notifies client A, the latter gets the correct port from the call to read(). But all subsequent notifications get lost, and client A just sits there blocking on read().
Is this intended? If not, where is the problem?
Regards,
Julian Stecklina
Quoted 7 lines
I am developing some userspace tools on Xen/Linux and have problems regarding the semantics of
/dev/linux/evtchn. The situation is as follows:Suppose client A allocates an unbound port.
Client B connects to this viabind_interdomain.
Client A reads on/dev/linux/evtchnto see whether it has been notified.
Quoted 5 lines
If client B now notifies client A, the latter gets the correct port from the call to
read(). But all subsequent notifications get lost, and client A just sits there blocking onread().Is this intended? If not, where is the problem?
Are you clearing the event channel after receiving the first notification?
Cheers,
Mark
Signature · 4 lines
Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel!
Quoted 1 line · Mark Williamson
Are you clearing the event channel after receiving the first notification?
No, but is not obvious how to do that using the ioctls provided in xen/linux/evtchn.h. IOCTL_EVTCHN_RESET seems to apply to all event channels.
Regards,
Julian
Quoted 5 lines · Julian Stecklina
Quoted 1 line · Mark Williamson
Are you clearing the event channel after receiving the first notification?
No, but is not obvious how to do that using the ioctls provided in
xen/linux/evtchn.h.IOCTL_EVTCHN_RESETseems to apply to all event channels.
Write the event channel number to the device.
regards
john