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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 69A36BC57 for ; Fri, 30 Oct 2009 00:43:14 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At8BACfF6UrZSMDqkWdsb2JhbACBT5l7AQEBAQkLCgcTA8M0hD0E X-IronPort-AV: E=Sophos;i="4.44,649,1249250400"; d="scan'208";a="37235287" Received: from fmmailgate03.web.de ([217.72.192.234]) by mail3-smtp-sop.national.inria.fr with ESMTP; 30 Oct 2009 00:43:13 +0100 Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate03.web.de (Postfix) with ESMTP id 4697E12B3FEAB; Fri, 30 Oct 2009 00:43:13 +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 1N3ee8-0006qY-00; Fri, 30 Oct 2009 00:43:12 +0100 Received: from mrvn by frosties.localdomain with local (Exim 4.69) (envelope-from ) id 1N3ee8-0005mW-BY; Fri, 30 Oct 2009 00:43:12 +0100 From: Goswin von Brederlow To: Gerd Stolpmann Cc: Florian Weimer , Goswin von Brederlow , 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> <1256850244.24202.105.camel@flake.lan.gerd-stolpmann.de> Date: Fri, 30 Oct 2009 00:43:12 +0100 In-Reply-To: <1256850244.24202.105.camel@flake.lan.gerd-stolpmann.de> (Gerd Stolpmann's message of "Thu, 29 Oct 2009 22:04:04 +0100") Message-ID: <87r5sl3gxb.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: V01U2FsdGVkX18hvV3KErTs0+eMcFX68mmKHZ0PpPU5d3nUa/Za rpLjniBeWnPD5yCFQ+5gwtgaFujE+kIFgD34LfMeFwRz/Sw9UL 1RUJOGMgs= X-Spam: no; 0.00; bigarray:01 gerd:01 stolpmann:01 gerd:01 donnerstag:01 aligned:01 afaik:01 chunks:01 mfg:98 threads:01 threads:01 ints:01 caml-list:01 writes:01 reorder:01 Gerd Stolpmann writes: > Am Donnerstag, den 29.10.2009, 21:40 +0100 schrieb Florian Weimer: >> * 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. > > Right. There is also the question whether aio for regular files (i.e. > files backed by page cache) is continued to be supported at all - it is > well known that Linus Torvalds doesn't like it. It can happen that at > some day aio will be restricted to block devices only. > > So I wouldn't use it for production code, but it is of course still an > interesting interface. > > Gerd Damn. That seems so stupid. Then writing asynchronous will only be possible with creating a pot full of worker thread, each one writing one chunk. So you get all those chunks in random order submitted to the kernel, the kernel has to reorder them, fit them back together, write them and then wake up the right thread for each piece completed. So much extra work while libaio has all the data already in perfect structures for the kernel. And how will you do barriers when writing with threads? Wait for all threads to complete every time you hit a barrier and thereby stalling the pipeline? MfG Goswin