English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Asynchronous IO programming in OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-10-25 (08:42)
From: Goswin von Brederlow <goswin-v-b@w...>
Subject: Re: [Caml-list] Asynchronous IO programming in OCaml
Jérémie Dimino <jeremie@dimino.org> writes:

> On Sun, Oct 24, 2010 at 01:54:50PM -0700, Anil Madhavapeddy wrote:
>>    Async disk I/O under Linux is annoyingly problematic if you aren't using
>>    direct I/O (and hence page/block-aligned structures). Avoid if possible :)
> The next version of Lwt will support asynchronous disk I/O by using
> mincore + mmap. It is already in the development version.
> Jérémie

Doesn't that mean you have to do polling of all pending I/O? That seems
horrible ineficient (you check them all every time) or slow I/Os can
starve quick ones (you only check the oldest ones).

The nice thing about libaio is that you get events as I/O completes and
you get many events in one simple syscall. Doing thousands of I/O
requests in parallel is trivial there.