Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 16 Oct 2002 19:42:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 16 Oct 2002 19:42:45 -0400 Received: from mtao-m02.ehs.aol.com ([64.12.52.8]:41685 "EHLO mtao-m02.ehs.aol.com") by vger.kernel.org with ESMTP id ; Wed, 16 Oct 2002 19:42:43 -0400 Date: Wed, 16 Oct 2002 16:48:32 -0700 From: John Gardiner Myers Subject: epoll (was Re: [PATCH] async poll for 2.5) To: Mark Mielke Cc: Davide Libenzi , Benjamin LaHaise , Dan Kegel , Shailabh Nagar , linux-kernel , linux-aio , Andrew Morton , David Miller , Linus Torvalds , Stephen Tweedie Message-id: <3DADFAD0.1070108@netscape.com> MIME-version: 1.0 Content-type: multipart/signed; boundary=------------ms070202050209050405090205; 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: <3DADACD6.4000200@netscape.com> <20021016200620.GA9067@mark.mielke.cc> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6350 Lines: 105 This is a cryptographically signed message in MIME format. --------------ms070202050209050405090205 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mark Mielke wrote: >Not to enter into any of the other discussions on this issue, I wouldn't >usually do what you suggest above. [...] if I did I >a recv() or read() of 2K, and I only received 1K, there is no reason why >another system call should be invoked on the resource that likely will not >have any data ready. > > You're into the minutiae here. Sure, you can optimize the read() in some cases, but Mr. Libenzi's example of a correct code scheme is no better than mine when it comes to this. In some situations, I've found that optimizing in the other direction is useful. When a peer is feeding you data slowly you can increase throughput by having the thread block on read for a couple of milliseconds before going back to the pool. A large part of that was that the particular event delivery subsystem was expensive. --------------ms070202050209050405090205 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 Y2FwZS5jb20wHwYDVR0jBBgwFoAUKduyLYN+f4sju8LMZrk56CnzAoYwQQYIKwYBBQUHAQEE NTAzMDEGCCs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BggqhkiG9w0DAgICAIAwDQYIKoZIhvcNAwICAUAw BwYFKw4DAgcwDQYIKoZIhvcNAwICASgwga0GCyqGSIb3DQEJEAILMYGdoIGaMIGTMQswCQYD VQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxGzAZBgNVBAoT EkFtZXJpY2EgT25saW5lIEluYzEZMBcGA1UECxMQQU9MIFRlY2hub2xvZ2llczEnMCUGA1UE AxMeSW50cmFuZXQgQ2VydGlmaWNhdGUgQXV0aG9yaXR5AgJb3zANBgkqhkiG9w0BAQEFAASB gBHgmUJO5G2Z4lvHWAr4ncufm6J4yhio0H5bnru5CVj5jneWd8AoBRRtVTCMkr1mqnhkeAav Z9jA/ln8IrOZJm9Spwc5GE1pclUBWtRAc1T2M4RgovJJI0osBuazm/sbrhdM7obCmlRzOeDp ZrsfKH8vl1SH4qbMudsI0j/3L8WqAAAAAAAA --------------ms070202050209050405090205-- - 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/