From owner-freebsd-arch@FreeBSD.ORG Thu Nov 13 08:59:08 2014 Return-Path: <owner-freebsd-arch@FreeBSD.ORG> 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 86F94205; Thu, 13 Nov 2014 08:59:08 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [IPv6:2001:470:1f05:b76::196]) by mx1.freebsd.org (Postfix) with ESMTP id 72332860; Thu, 13 Nov 2014 08:59:08 +0000 (UTC) Received: from AlfredMacbookAir.local (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id 2BAE7341F854; Thu, 13 Nov 2014 00:59:08 -0800 (PST) Message-ID: <546472DA.3080006@freebsd.org> Date: Thu, 13 Nov 2014 00:59:06 -0800 From: Alfred Perlstein <alfred@freebsd.org> Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: freebsd-arch@freebsd.org, Adrian Chadd <adrian@freebsd.org> Subject: Re: Questions about locking; turnstiles and sleeping threads References: <CAJ-VmomrauhCMoF_dZfMWWhZp0EgwfE9RmxL5Pc37PhLSzZ6Qg@mail.gmail.com> <20141112212613.21037929@kan> <CAJ-Vmok-8znyycyOBS_ZQU275zFy+zuZ2C-jt4N3DnuEVS=PWg@mail.gmail.com> <CAJ-Vmo=R4ayAn-d986TC3CzZ4y23jnDW=uTyo4O=x4Ae1wB60A@mail.gmail.com> <CAJ-Vmok40-W++dUJPcfO74+uudCgbs3tR5nwrR-aNuCy=5o0HQ@mail.gmail.com> In-Reply-To: <CAJ-Vmok40-W++dUJPcfO74+uudCgbs3tR5nwrR-aNuCy=5o0HQ@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture <freebsd-arch.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-arch>, <mailto:freebsd-arch-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-arch/> List-Post: <mailto:freebsd-arch@freebsd.org> List-Help: <mailto:freebsd-arch-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-arch>, <mailto:freebsd-arch-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 13 Nov 2014 08:59:08 -0000 On 11/12/14, 11:25 PM, Adrian Chadd wrote: > On 12 November 2014 19:48, Adrian Chadd <adrian@freebsd.org> 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.... -Alfred