Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 19 Feb 2001 16:56:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 19 Feb 2001 16:56:47 -0500 Received: from ferret.lmh.ox.ac.uk ([163.1.18.131]:31760 "HELO ferret.lmh.ox.ac.uk") by vger.kernel.org with SMTP id ; Mon, 19 Feb 2001 16:56:32 -0500 Date: Mon, 19 Feb 2001 21:56:26 +0000 (GMT) From: Chris Evans To: cc: , Subject: Re: SO_SNDTIMEO: 2.4 kernel bugs In-Reply-To: <200102191803.VAA12658@ms2.inr.ac.ru> 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 On Mon, 19 Feb 2001 kuznet@ms2.inr.ac.ru wrote: > Wakeup does not happen until _enough_ (1/3 of snbuf) of space in sndbuf > is released, otherwise you will overschedule. So, as soon as > write() goes to sleep, it will sleep waiting until 1/3 is released. Of course. Thank you. > If it is interrupted, it use all the released space immediately before > exit. Again, to make more for in this context. This can be even wrong > and, probably, we should return instantly with -EAGAIN/-EINTR/partial > count, but it is most likely suboptimal (though I have already changed > this to instant return). But this does not look essential from > caller's viewpoint, except for sendfile() of course. 8) Cool. I think the proper fix, long term, is to fix our internal I/O routine APIs so that they are capable of returning a byte count _and_ an error. One day, that might be a useful thing to export to userspace. Cheers Chris - 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/