From owner-svn-src-all@freebsd.org Tue Oct 20 22:42:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A598A1AA91; Tue, 20 Oct 2015 22:42:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCE0914A3; Tue, 20 Oct 2015 22:42:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CAA53B964; Tue, 20 Oct 2015 18:42:46 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289661 - head/sys/kern Date: Tue, 20 Oct 2015 14:46:18 -0700 Message-ID: <1597934.qIGj71kvt0@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201510202029.t9KKTLK7060975@repo.freebsd.org> References: <201510202029.t9KKTLK7060975@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 20 Oct 2015 18:42:46 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Oct 2015 22:42:49 -0000 On Tuesday, October 20, 2015 08:29:21 PM Konstantin Belousov wrote: > Author: kib > Date: Tue Oct 20 20:29:21 2015 > New Revision: 289661 > URL: https://svnweb.freebsd.org/changeset/base/289661 > > Log: > Mark struct thread zone as type-stable. > > When establishing the locking state for several lock types (including > blockable mutexes and sx) failed, locking primitives try to spin while > the owner thread is running. The spinning loop performs the test for > running condition by dereferencing the owner->td_state field of the > owner thread. If the owner thread exited while spinner was put off > the processor, it is harmless to access reused struct thread owner, > since in some near future the current processor would notice the owner > change and make appropriate progress. But it could be that the page > which carried the freed struct thread was unmapped, then we fault > (this cannot happen on amd64). > > For now, disallowing free of the struct thread seems to be good > enough, and tests which create a lot of threads once, did not > demonstrated regressions. > > Reviewed by: jhb, pho > Reported and tested by: pho > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks > Differential revision: https://reviews.freebsd.org/D3908 PR: 65448 -- John Baldwin