From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id E24DBBC37 for ; Fri, 30 Oct 2009 00:38:56 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvkBAPrD6UrZSMDji2dsb2JhbACBT5l7AQEBCgsKBxEFwzaEPQQ X-IronPort-AV: E=Sophos;i="4.44,649,1249250400"; d="scan'208";a="39198000" Received: from fmmailgate02.web.de ([217.72.192.227]) by mail1-smtp-roc.national.inria.fr with ESMTP; 30 Oct 2009 00:38:56 +0100 Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate02.web.de (Postfix) with ESMTP id 2EEA513B28D36; Fri, 30 Oct 2009 00:38:56 +0100 (CET) Received: from [95.208.117.111] (helo=frosties.localdomain) by smtp06.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #314) id 1N3ea0-0006G4-00; Fri, 30 Oct 2009 00:38:56 +0100 Received: from mrvn by frosties.localdomain with local (Exim 4.69) (envelope-from ) id 1N3eZz-0005m1-LA; Fri, 30 Oct 2009 00:38:55 +0100 From: Goswin von Brederlow To: Florian Weimer Cc: caml-list@inria.fr Subject: Re: [Caml-list] Re: How to read different ints from a Bigarray? References: <87eiond3of.fsf@frosties.localdomain> <87639zd0m9.fsf@frosties.localdomain> <87639yue6y.fsf@mid.deneb.enyo.de> Date: Fri, 30 Oct 2009 00:38:55 +0100 In-Reply-To: <87639yue6y.fsf@mid.deneb.enyo.de> (Florian Weimer's message of "Thu, 29 Oct 2009 21:40:05 +0100") Message-ID: <87vdhx3h4g.fsf@frosties.localdomain> User-Agent: Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.22 (linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: goswin-v-b@web.de X-Sender: goswin-v-b@web.de X-Provags-ID: V01U2FsdGVkX1+H1BqPVC45m5eqAEisCOLgiZKjyxRk+GzoYmNy YyR8KUHpPhC7BjA8o6JsqUUVzu9DTiq2YxKS4eVJPboqF7tODP oigKOmlao= X-Spam: no; 0.00; bigarray:01 aligned:01 afaik:01 buffer:01 aligned:01 bigarray:01 mfg:98 ints:01 caml-list:01 writes:01 data:02 rarely:02 string:02 florian:03 asynchronous:03 Florian Weimer writes: > * Goswin von Brederlow: > >> - The data is passed to libaio and needs to be kept alive and unmoved >> as long as libaio knows it. > > It also has to be aligned to a 512-byte boundary, so you can use > O_DIRECT. Linux does not support truely asynchronous I/O without > O_DIRECT AFAIK, which rarely makes it worth the trouble. True. But the libaio can provide a Aio.Buffer.make that returns an aligned Bigarray (or string or whatever, currently a custom type). If you write to files on a filesystem without O_DIRECT it will block when submitting the requests till they have completed. Not sure what happens on block devices without O_DIRECT. My use case is for a Fuse Filesystem and writing to disks. O_DIRECT is quite alright there. If you can't use O_DIRECT then you are left with going multithreaded. MfG Goswin