From: Ian Campbell Subject: Re: [PATCH 21/28] libxl: ocaml: add wrappers for poll Date: Tue, 23 Apr 2013 16:31:08 +0100 Message-ID: <1366731068.20256.182.camel@zakaz.uk.xensource.com> References: <1364222729-6982-1-git-send-email-rob.hoes@citrix.com> <1364222729-6982-22-git-send-email-rob.hoes@citrix.com> <1365683460.8036.93.camel@zakaz.uk.xensource.com> <7EA643C653F17F4C80DE959E978F10ED010F729E0192@LONPMAILBOX01.citrite.net> <1366724631.20256.151.camel@zakaz.uk.xensource.com> <51769305.2030607@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51769305.2030607@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dave Scott Cc: Rob Hoes , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, 2013-04-23 at 14:56 +0100, Dave Scott wrote: > On 23/04/13 14:43, Ian Campbell wrote: > > (aside: I'd really love it if tools/ocaml/libs/mmap could find a non-Xen > > home too ;-)) > > I think I can arrange that. > > In the mirage code we've settled on using OCaml 'bigarrays' [1] > (wrappers around C arrays) to pass around buffers, represent memory > pages etc. The OCaml standard library has the ability to mmap() stuff > and return a bigarray but there Cool! > was an unfortunate bug where it assumed > the thing being mmap()ed also supported lseek() [2]. Not Cool! > The bug was fixed in OCaml 4.00.0 so if we're happy to depend on that > then we're ready to roll. 4.00.0 might be a bit bleeding edge to rely on outright. Ubuntu Raring still only has 3.12.1. Debian has 4.00.1 in experimental but the next stable release will have 3.12.x. Would it be possible to turn the existing mmap thing into a compat wrapper around the bigarrays for the case where the underlying ocaml is buggy in this way? Perhaps that is a lot of work and we should just shelve this conversation for a couple of distro release cycles and reconsider making this change then. Ian.