From owner-freebsd-arch@FreeBSD.ORG Mon Apr 5 22:13:32 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57D711065678 for ; Mon, 5 Apr 2010 22:13:32 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3471D8FC26 for ; Mon, 5 Apr 2010 22:13:32 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id B2D5C46B29; Mon, 5 Apr 2010 18:13:31 -0400 (EDT) Date: Mon, 5 Apr 2010 23:13:31 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Jilles Tjoelker In-Reply-To: <20100404175140.GB40499@stack.nl> Message-ID: References: <20100404175140.GB40499@stack.nl> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-arch@freebsd.org Subject: Re: so_rcv_sx, deadlkres, SIGSTOP X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 22:13:32 -0000 On Sun, 4 Apr 2010, Jilles Tjoelker wrote: > The SX locks so_snd_sx and so_rcv_sx can be legitimately held for arbitrary > amounts of time, while waiting until a send or recv is possible. Any other > threads wanting to send/recv on the socket will sleep interruptibly on the > corresponding SX. If deadlkres is activated, it may detect a deadlock even > though there is no problem. Actually, on the whole, socket buffer sx lock acquisition is interruptible. There are a few exceptions, such as during socket shutdown, and in an RPC layer or two, but in the general case we want Ctrl-C to interrupt recv() and send(), so use interruptible sleeps. Robert