Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S269322AbUJFQH7 (ORCPT ); Wed, 6 Oct 2004 12:07:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S269325AbUJFQH6 (ORCPT ); Wed, 6 Oct 2004 12:07:58 -0400 Received: from chaos.analogic.com ([204.178.40.224]:6016 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id S269322AbUJFQH4 (ORCPT ); Wed, 6 Oct 2004 12:07:56 -0400 Date: Wed, 6 Oct 2004 12:07:43 -0400 (EDT) From: "Richard B. Johnson" Reply-To: root@chaos.analogic.com To: "David S. Miller" cc: Chris Friesen , joris@eljakim.nl, linux-kernel@vger.kernel.org Subject: Re: UDP recvmsg blocks after select(), 2.6 bug? In-Reply-To: <20041006084128.38e9970d.davem@davemloft.net> Message-ID: References: <20041006080104.76f862e6.davem@davemloft.net> <20041006082145.7b765385.davem@davemloft.net> <41640FE2.3080704@nortelnetworks.com> <20041006084128.38e9970d.davem@davemloft.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1708 Lines: 44 On Wed, 6 Oct 2004, David S. Miller wrote: > On Wed, 06 Oct 2004 09:31:46 -0600 > Chris Friesen wrote: > >> David S. Miller wrote: >> >>> So if select returns true, and another one of your threads >>> reads all the data from the file descriptor, what would you >>> like the behavior to be for the current thread when it calls >>> read? >> >> What about the single-threaded case? > > Incorrect UDP checksums could cause the read data to > be discarded. We do the copy into userspace and checksum > computation in parallel. This is totally legal and we've > been doing it since 2.4.x first got released. > > Use non-blocking sockets with select()/poll() and be happy. Gawd. This is damn awful. How could this possibly be justified? You can't have a system call that lies. We already have an OS that does that. Certainly, no other Unix OS in the past has thrown away integrity with such aplomb. Next, in the interest of "performance", you'll probably only occasionally provide file-data, as well. You can't do this. When there is some well-defined procedure such as select() or poll(), that is designed to provide a reliable way of knowing that a read will succeed, you or anybody else don't have the authority to declare that it's not important to actually have it work. Cheers, Dick Johnson Penguin : Linux version 2.6.5-1.358-noreg on an i686 machine (5537.79 BogoMips). Note 96.31% of all statistics are fiction. - 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/