From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 1DF95BBAF for ; Mon, 25 Oct 2010 10:42:07 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoADAD7fxEzZSMDde2dsb2JhbACTaY10FQEBCwsKBREFH7pthUgEjVM X-IronPort-AV: E=Sophos;i="4.58,235,1286143200"; d="scan'208";a="75999780" Received: from fmmailgate01.web.de ([217.72.192.221]) by mail2-smtp-roc.national.inria.fr with ESMTP; 25 Oct 2010 10:42:06 +0200 Received: from smtp04.web.de ( [172.20.0.225]) by fmmailgate01.web.de (Postfix) with ESMTP id 5FD6A1707CCE4 for ; Mon, 25 Oct 2010 10:42:06 +0200 (CEST) Received: from [78.43.204.177] (helo=frosties.localdomain) by smtp04.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #24) id 1PAId4-0001on-00 for caml-list@yquem.inria.fr; Mon, 25 Oct 2010 10:42:06 +0200 Received: from mrvn by frosties.localdomain with local (Exim 4.72) (envelope-from ) id 1PAId3-00029G-Se for caml-list@yquem.inria.fr; Mon, 25 Oct 2010 10:42:05 +0200 From: Goswin von Brederlow To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Asynchronous IO programming in OCaml In-Reply-To: <20101024225037.GA8999@aurora> ("Jeremie Dimino"'s message of "Mon, 25 Oct 2010 00:50:37 +0200") References: <044101cb7367$10f94b30$32ebe190$@com> <20101024225037.GA8999@aurora> User-Agent: Gnus/5.110009 (No Gnus v0.9) XEmacs/21.4.22 (linux, no MULE) Date: Mon, 25 Oct 2010 10:42:05 +0200 Message-ID: <87y69mk6jm.fsf@frosties.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: goswin-v-b@web.de X-Sender: goswin-v-b@web.de X-Provags-ID: V01U2FsdGVkX18D8cBH5/P6tVfZlJvuruOvmeSMmlsP8N2s0ojZ n+7Mn8HUlAkre0sm3cxYagKqSREdMSCuwWWxicW7WHyBsCBBot +Rb3J7F4s= X-Spam: no; 0.00; ocaml:01 anil:01 async:01 trivial:01 mfg:98 wrote:01 caml-list:01 writes:01 structures:02 seems:03 asynchronous:03 programming:03 asynchronous:03 parallel:05 linux:07 Jérémie Dimino 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. MfG Goswin