Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 17 Oct 2002 14:00:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 17 Oct 2002 14:00:18 -0400 Received: from mtao-m02.ehs.aol.com ([64.12.52.8]:35032 "EHLO mtao-m02.ehs.aol.com") by vger.kernel.org with ESMTP id ; Thu, 17 Oct 2002 14:00:14 -0400 Date: Thu, 17 Oct 2002 11:06:05 -0700 From: John Gardiner Myers Subject: Re: epoll (was Re: [PATCH] async poll for 2.5) To: Davide Libenzi Cc: Benjamin LaHaise , Dan Kegel , Shailabh Nagar , linux-kernel , linux-aio , Andrew Morton , David Miller , Linus Torvalds , Stephen Tweedie Message-id: <3DAEFC0D.9010103@netscape.com> MIME-version: 1.0 Content-type: multipart/signed; boundary=------------ms020904050004020003040806; micalg=sha1; protocol="application/x-pkcs7-signature" X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2a) Gecko/20020910 References: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6488 Lines: 130 This is a cryptographically signed message in MIME format. --------------ms020904050004020003040806 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Davide Libenzi wrote: >>Nonsense. If you wish to make such a claim, you need to provide an >>example of a situation in which it won't work. >> >> > >Your welcome. This is your code : > >for (;;) { > fd = event_wait(...); > while (do_io(fd) != EAGAIN); >} > >If the I/O space is not exhausted when you call event_wait(...); you'll >never receive the event because you'll be waiting a 0->1 transaction >without bringing the signal to 0 ( I/O space exhausted ). > My code above does exhaust the I/O space. > That one is a >typical use of poll() - select() - /dev/poll and you showed pretty clearly >that you do not seem to understand edge triggered event APIs. If you code >your I/O function like : > >int my_io(...) { > > if (event_wait(...)) > do_io(...); > >} > This is not how my example is coded. while (do_io(...) != EAGAIN); is not equivalent to: do_io(...); The former is guaranteed to exhaust the I/O space, the latter is not. You're spouting nonsense. --------------ms020904050004020003040806 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 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIK7TCC A4UwggLuoAMCAQICAlvfMA0GCSqGSIb3DQEBBAUAMIGTMQswCQYDVQQGEwJVUzELMAkGA1UE CBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxGzAZBgNVBAoTEkFtZXJpY2EgT25saW5l IEluYzEZMBcGA1UECxMQQU9MIFRlY2hub2xvZ2llczEnMCUGA1UEAxMeSW50cmFuZXQgQ2Vy dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTAyMDYwMTIwMjIyM1oXDTAyMTEyODIwMjIyM1owfTEL MAkGA1UEBhMCVVMxGzAZBgNVBAoTEkFtZXJpY2EgT25saW5lIEluYzEXMBUGCgmSJomT8ixk AQETB2pnbXllcnMxIzAhBgkqhkiG9w0BCQEWFGpnbXllcnNAbmV0c2NhcGUuY29tMRMwEQYD VQQDEwpKb2huIE15ZXJzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDsB5tbTLWFycke FKQwy1MTNx7SFtehB26RBx2gT+6+5/sYfXuLmBOuEOU2646fK0tz4rFOXfR8TcLfxOp3anh2 3pKDAnBEOp5u75bEIwY5nteR0opdni/CTeyCfJ1uPuYdNKTYC088GwbpzhBRE8n1APHXCBgv bnGAuuYw/BqDtwIDAQABo4H8MIH5MA4GA1UdDwEB/wQEAwIFIDAdBgNVHSUEFjAUBggrBgEF BQcDAgYIKwYBBQUHAwQwQwYJYIZIAYb4QgENBDYWNElzc3VlZCBieSBOZXRzY2FwZSBDZXJ0 aWZpY2F0ZSBNYW5hZ2VtZW50IFN5c3RlbSA0LjUwHwYDVR0RBBgwFoEUamdteWVyc0BuZXRz Y2FwZS5jb20wHwYDVR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NEtuMz8Z+hIYTydT03nWho3a8wUgYJKoZI hvcNAQkPMUUwQzAKBggqhkiG9w0DBzAOBggqhkiG9w0DAgICAIAwDQYIKoZIhvcNAwICAUAw BwYFKw4DAgcwDQYIKoZIhvcNAwICASgwga0GCyqGSIb3DQEJEAILMYGdoIGaMIGTMQswCQYD VQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxGzAZBgNVBAoT EkFtZXJpY2EgT25saW5lIEluYzEZMBcGA1UECxMQQU9MIFRlY2hub2xvZ2llczEnMCUGA1UE AxMeSW50cmFuZXQgQ2VydGlmaWNhdGUgQXV0aG9yaXR5AgJb3zANBgkqhkiG9w0BAQEFAASB gBMg+Pp6heqcOU4crxO+jcGz59K/VwoXDw0kWByrnDRvrDfyuKiGIJUJ5MErBLEIcF4x9Ik8 q1ZiPDGh354EtJ6mMKxW/TJ6q6+UeJr6tr/uLA19HM/AYPfjePcwLCnP63EHK3+22PVvY9Hr oqXT6kS/18/aWSvmdcCN/DBUSJ+nAAAAAAAA --------------ms020904050004020003040806-- - 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/