Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264059AbTFDUhA (ORCPT ); Wed, 4 Jun 2003 16:37:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264043AbTFDUfK (ORCPT ); Wed, 4 Jun 2003 16:35:10 -0400 Received: from spanner.eng.cam.ac.uk ([129.169.8.9]:10740 "EHLO spanner.eng.cam.ac.uk") by vger.kernel.org with ESMTP id S264054AbTFDUes (ORCPT ); Wed, 4 Jun 2003 16:34:48 -0400 Date: Wed, 4 Jun 2003 21:48:13 +0100 (BST) From: "P. Benie" To: Linus Torvalds cc: Alan Cox , Christoph Hellwig , Linux Kernel Mailing List Subject: Re: [PATCH] [2.5] Non-blocking write can block In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1035 Lines: 24 On Wed, 4 Jun 2003, Linus Torvalds wrote: > On Wed, 4 Jun 2003, P. Benie wrote: > > The problem isn't to do with large writes. It's to do with any sequence of > > writes that fills up the receive buffer, which is only 4K for N_TTY. If > > the receiving program is suspended, the buffer will fill sooner or later. > > Well, even then we could just drop the "write_atomic" lock. > > The thing is, I don't know what the tty atomicity guarantees are. I know > what they are for pipes (quite reasonable), but tty's? We don't have a PIPE_BUF-style atomicity guarantee, even though this would be quite useful. This lock is only used to prevent simultaneous writes from being interleaved. I've always assumed that when writes shouldn't be interleaved, but I can't quote a source for that. Peter - 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/