Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758196AbWK0Njc (ORCPT ); Mon, 27 Nov 2006 08:39:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758203AbWK0Njc (ORCPT ); Mon, 27 Nov 2006 08:39:32 -0500 Received: from wr-out-0506.google.com ([64.233.184.227]:50384 "EHLO wr-out-0506.google.com") by vger.kernel.org with ESMTP id S1758196AbWK0Njb (ORCPT ); Mon, 27 Nov 2006 08:39:31 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=CQORImdUQ0CKxZeNdmdc46mOnA4O4F/d3qeAC6UzfgqV7aH4COx37Q/4Xrwr5j5wFkoYMKXz9vRcIHKZ2zUnvy/ijD7GfotiK0nJT0MxHmSk6h9ydUvVx0izVv9e2w+IC6Bnfb8PJUT+h9fuiNVq+71JLuuU7TMkCu4K2N/XLX4= Message-ID: <344eb09a0611270539v6b65fb6bo9f7bfcc24f1a9a73@mail.gmail.com> Date: Mon, 27 Nov 2006 19:09:29 +0530 From: "Bharata B Rao" To: "=?ISO-8859-1?Q?S=E9bastien_Dugu=E9?=" Subject: Re: [PATCH -mm 4/4][AIO] - Listio support Cc: linux-kernel , linux-aio , "Andrew Morton" , "Suparna Bhattacharya" , "Christoph Hellwig" , "Zach Brown" , "Badari Pulavarty" , "Jean Pierre Dion" , "Ulrich Drepper" In-Reply-To: <20061120152307.46dbf409@frecb000686> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_77092_19065165.1164634769333" References: <20061120151700.4a4f9407@frecb000686> <20061120152307.46dbf409@frecb000686> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 17786 Lines: 253 ------=_Part_77092_19065165.1164634769333 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 11/20/06, S=E9bastien Dugu=E9 wrote: > > POSIX listio support > > This patch adds POSIX listio completion notification support. It builds > on support provided by the aio signal notification patch and adds an > IOCB_CMD_GROUP command to io_submit(). > I have altered this patch to provide the listio support through a separate syscall. The code is in RFC stage at the moment and is only compile-tested on i386. I have refrained from modifying unistd.h for now in order to avoid touching too many files. I plan to do actual tests (which involves user space changes to aio libraries) only if there is an agreement with this syscall approach. More details about the interface are in the patch itself. Regards, Bharata. ------=_Part_77092_19065165.1164634769333 Content-Type: text/x-patch; name=aio-listio-support.patch; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_ev0xmpnl Content-Disposition: attachment; filename="aio-listio-support.patch" CiAgVGhpcyBwYXRjaCBhZGRzIFBPU0lYIGxpc3RpbyBjb21wbGV0aW9uIG5vdGlmaWNhdGlvbiBz dXBwb3J0LiBJdCBidWlsZHMKb24gc3VwcG9ydCBwcm92aWRlZCBieSB0aGUgYWlvIHNpZ25hbCBu b3RpZmljYXRpb24gcGF0Y2ggYW5kIGFkZHMgYQpzeXN0ZW0gY2FsbCBsaW9fc3VibWl0KCkuCgog IGxpb19zdWJtaXQoKSBpcyBzaW1pbGFyIHRvIGlvX3N1Ym1pdCgpIGV4Y2VwdCB0aGF0IGl0IHRh a2VzIHR3byBtb3JlCmFyZ3VybWVudHM6IG1vZGUgYW5kIHNpZ2V2ZW50LgoKICBtb2RlIGNhbiBi ZSBMSU9fV0FJVCBvciBMSU9fTk9XQUlULiBzaWdldmVudCBhcmd1bWVudCBzcGVjaWZpY2llcwp0 aGUgc2lnZXZlbnQgbm90aWZpY2F0aW9uIG1lY2hhbmlzbSBvbiBsaXN0aW8gY29tcGxldGlvbi4g bGlvX3N1Ym1pdCgpCndhaXRzIHdpdGhpbiB0aGUgc3lzY2FsbCBpZiBMSU9fV0FJVCBpcyBzcGVj aWZpZWQuCgogIEEgc3RydWN0IGxpb19ldmVudCBpcyBhZGRlZCBpbiBpbmNsdWRlL2xpbnV4L2F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191c2VyICosIHN0cnVjdCBz aWdldmVudCBfX3VzZXIgKik7CiBhc21saW5rYWdlIGxvbmcgc3lzX2lvX2NhbmNlbChhaW9fY29u dGV4dF90IGN0eF9pZCwgc3RydWN0IGlvY2IgX191c2VyICppb2NiLAogCQkJICAgICAgc3RydWN0 IGlvX2V2ZW50IF9fdXNlciAqcmVzdWx0KTsKIGFzbWxpbmthZ2Ugc3NpemVfdCBzeXNfc2VuZGZp bGUoaW50IG91dF9mZCwgaW50IGluX2ZkLApfCg== ------=_Part_77092_19065165.1164634769333-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/