[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 21/28] libxl: ocaml: add wrappers for poll

  • To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
  • From: Rob Hoes <Rob.Hoes@xxxxxxxxxx>
  • Date: Tue, 23 Apr 2013 14:37:55 +0100
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Cc: "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>
  • Delivery-date: Tue, 23 Apr 2013 13:40:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac42sG3zlLIgYMBzQw+wW8UHIW/IlQJdjOEQ
  • Thread-topic: [PATCH 21/28] libxl: ocaml: add wrappers for poll

> Other than Dave's comment it looks good to me.
> But how does the event model work in your callers today? The intention
> with the libxl event interface is that by implementing the right hooks to
> register/deregister fds you can just continue to use your existing event loop
> (presuming it can take events on fds).

I have been experimenting with two different ways of doing this.

Xenopsd does not yet have an fd polling loop that we can easily use for libxl 
events. For this reason I just wrapped the poll function myself and ran it 
separately. The other option is to use a library such as Lwt 
(http://ocsigen.org/lwt/), which does have an event loop we can easily 
integrate with, and I got the libxl fd registration stuff working with this in 
a test program.

The problem with the latter approach is that it requires quite a rather big 
rewrite of xenopsd in order to use Lwt (or a something similar), and we did not 
have time for that yet (we probably will at some point).

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.