Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265496AbTFSUkq (ORCPT ); Thu, 19 Jun 2003 16:40:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265487AbTFSUkq (ORCPT ); Thu, 19 Jun 2003 16:40:46 -0400 Received: from c3po.aoltw.net ([64.236.137.25]:23734 "EHLO netscape.com") by vger.kernel.org with ESMTP id S265496AbTFSUkb (ORCPT ); Thu, 19 Jun 2003 16:40:31 -0400 Message-ID: <3EF22301.1000003@netscape.com> Date: Thu, 19 Jun 2003 13:54:25 -0700 From: jgmyers@netscape.com (John Myers) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Scot McKinley CC: Joel Becker , Linux Kernel Mailing List , "linux-aio@kvack.org" Subject: Re: [PATCH 2.5.71-mm1] aio process hang on EINVAL References: <1055810609.1250.1466.camel@dell_ss5.pdx.osdl.net> <3EEE6FD9.2050908@netscape.com> <20030617085408.A1934@in.ibm.com> <1055884008.1250.1479.camel@dell_ss5.pdx.osdl.net> <3EEFAC58.905@netscape.com> <20030618001534.GJ7895@parcelfarce.linux.theplanet.co.uk> <3EEFB165.5070208@netscape.com> <20030618004214.GK7895@parcelfarce.linux.theplanet.co.uk> <3EF104D7.5050905@netscape.com> <3EF11662.2060102@oracle.com> In-Reply-To: <3EF11662.2060102@oracle.com> Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------ms080404040305040902080504" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 8135 Lines: 141 This is a cryptographically signed message in MIME format. --------------ms080404040305040902080504 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Scot McKinley wrote: > > The kernel could > > even detect success during queuing if it really tried. > > Yes, this is also a good thing, as i mentioned in my earlier message. > ie, if the io has ALREADY completed, return it immediately. io_submit() is incapable of returning operation success notifications. It can only return notifications of idempotent errors, since callers who submit multiple requests might need to call io_submit() twice to find out what the error was. > Yes, the program WILL be able to handle async completions, obviously, > since > it attempting aio submissions. However, it MAY also be able to handle > synchronous/immediate completions of its aio submissions. "MAY" is far cry from "MUST". I object strongly to requiring all callers to io_submit() to be able to handle immediate completions. In my aio framework, the caller of io_submit() is not in a context where it can invoke completion callbacks, since completion callbacks are not required to be reentrant. Adding an optional facility to permit callers to receive immediate completions is a different issue. > > So? That is a miniscule amount of resources used by an extremely rare > > condition. Such a picayune optimization hardly justifies the necessary > > increase in complexity. > > It may not be miniscule. For the specific conditions under discussion, it was. The conditions were certainly extremely rare. > As we expand the ability to do aio to network > descriptors, the transport that we are utilizing could easily have a > "bcopy threshold" (a bcopy thresheld, for those that don't know, is the > threshold under which all io will be done synchronously. The traditional way of dealing with this is to first call the synchronous nonblocking interface, retrying with the asynchronous interface only when the nonblocking one indicates no progress. Not only does this save the cost of the (expensive when poll-based) queuing overhead, it can save the cost of operations required only when going async, such as copying the data from the stack to the heap. --------------ms080404040305040902080504 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIL0zCC A9YwggM/oAMCAQICBAIAAeYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCVVMxGDAWBgNV BAoTD0dURSBDb3Jwb3JhdGlvbjEcMBoGA1UEAxMTR1RFIEN5YmVyVHJ1c3QgUm9vdDAeFw0w MTA2MDExMjQ3MDBaFw0wNDA2MDEyMzU5MDBaMIGTMQswCQYDVQQGEwJVUzELMAkGA1UECBMC Q0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxGzAZBgNVBAoTEkFtZXJpY2EgT25saW5lIElu YzEZMBcGA1UECxMQQU9MIFRlY2hub2xvZ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TDU1vdW50YWluIFZp ZXcxGzAZBgNVBAoTEkFtZXJpY2EgT25saW5lIEluYzEZMBcGA1UECxMQQU9MIFRlY2hub2xv Z2llczEnMCUGA1UEAxMeSW50cmFuZXQgQ2VydGlmaWNhdGUgQXV0aG9yaXR5AgJt+jCBrQYL KoZIhvcNAQkQAgsxgZ2ggZowgZMxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UE BxMNTW91bnRhaW4gVmlldzEbMBkGA1UEChMSQW1lcmljYSBPbmxpbmUgSW5jMRkwFwYDVQQL ExBBT0wgVGVjaG5vbG9naWVzMScwJQYDVQQDEx5JbnRyYW5ldCBDZXJ0aWZpY2F0ZSBBdXRo b3JpdHkCAm36MA0GCSqGSIb3DQEBAQUABIGAQcP62nEFbh4VtQ14quZZqDBnHnKNX1WJL7/j f08L0q2bDPjMJ+Kkp9vpzNc8fdJ4tdSts/2zxNi768TF+hB7wK3zP07Lnss9GQQUrDwXbuwQ wpWI1kPN03RcX3eFW+f2s/KpOvOk9Wv81vG1FJlcigippEFnat13a+G6vQT/g44AAAAAAAA= --------------ms080404040305040902080504-- - 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/