From owner-freebsd-arch@FreeBSD.ORG Thu Nov 13 09:09:45 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52CD8601; Thu, 13 Nov 2014 09:09:45 +0000 (UTC) Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D65DE962; Thu, 13 Nov 2014 09:09:44 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id n12so16276009wgh.27 for ; Thu, 13 Nov 2014 01:09:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ZSljn1TJZUwncX6VR4JJNBFoxgY/9cHAQ15WuJYDprs=; b=0/c78VaM3d+wI/ep38oNU0gcQY+a7PwrxZvkaCUiflIW61IDs39Q9NeXgBdeiVSKIa 2rkOx4LXIJXU/NC/S4W/+UdPIFT1h5BngDx9XSACkT4Og4OEIV7SQiS42+y7Nxd/uzpd ntVsfCUuGzyDYK4AjgSMvniurUN4K5LyUl8rjAbZuOW0fUVdcWZsati07GQJQStVyEeo NZIOdpOGuVNzut8z9y5sELrhwdVG2octPudQ+8rldk0iC50GgruXFmMY0etEWobOA6tH 9/KJvTMYqnnZbb8jClz3A/PyRTW3xZzdJRmJsmNaohCk7Ax6BA8+hHst8kMATLw1T8go 1CJg== MIME-Version: 1.0 X-Received: by 10.180.188.102 with SMTP id fz6mr1719451wic.59.1415869783298; Thu, 13 Nov 2014 01:09:43 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.136 with HTTP; Thu, 13 Nov 2014 01:09:43 -0800 (PST) In-Reply-To: <546472DA.3080006@freebsd.org> References: <20141112212613.21037929@kan> <546472DA.3080006@freebsd.org> Date: Thu, 13 Nov 2014 01:09:43 -0800 X-Google-Sender-Auth: 6uZop6itgP-DTdGVz-KWlyU2KMQ Message-ID: Subject: Re: Questions about locking; turnstiles and sleeping threads From: Adrian Chadd To: Alfred Perlstein Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-arch@freebsd.org" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2014 09:09:45 -0000 On 13 November 2014 00:59, Alfred Perlstein wrote: > > On 11/12/14, 11:25 PM, Adrian Chadd wrote: >> >> On 12 November 2014 19:48, Adrian Chadd wrote: >>> >>> kan pointed out that we should likely do a WITNESS_WARN() in the >>> relevant spots in the callout code so we catch these before it >>> happens. >>> >>> I'll see what we can add to -HEAD to be pro-active about it. >> >> Amusingly, I tried adding it and it made my laptop turn to soup very >> quickly - among other things, the TCP timer callouts are all setup >> with non sleep locks held. >> > > Howso? You only have to worry about callout_drain(), most other callout > functions should be safe-ish.... yeah, except for all the places where they drain the timer once something happens so it doesn't fire. :) -adrian