Date: Tue, 20 Oct 2015 14:46:18 -0700 From: John Baldwin <jhb@freebsd.org> To: Konstantin Belousov <kib@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289661 - head/sys/kern Message-ID: <1597934.qIGj71kvt0@ralph.baldwin.cx> In-Reply-To: <201510202029.t9KKTLK7060975@repo.freebsd.org> References: <201510202029.t9KKTLK7060975@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1597934.qIGj71kvt0>