Date: Sat, 4 Jun 2016 15:59:29 -0700 From: Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com> To: Matthew Seaman <matthew@freebsd.org> Cc: FreeBSD Questions Mailing List <freebsd-questions@freebsd.org>, bltsrc@mail.ru Subject: Re: Relevant mailing list Message-ID: <CAOgwaMsNdWRCeq9MM1R8E4%2Bdb==WM9U3cnHpwgXu0hKoMknXhQ@mail.gmail.com> In-Reply-To: <57534A45.8030802@FreeBSD.org> References: <1465068474.241692968@f361.i.mail.ru> <57534A45.8030802@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 4, 2016 at 2:38 PM, Matthew Seaman <matthew@freebsd.org> wrote: > On 2016/06/04 20:27, Bulat Bulat via freebsd-questions wrote: > > However, the meaning of ts_free member in turnstile structure for me is > unclear. > > My understanding: when thread discovers than lock's turnstile is already > present > > at turnstile chain it adds its own turnstile to lock's turnstile's > ts_free > > and after it wokes up it regrabs turnstile from the same > > ts_free list of lock's turnstile. But why does it so, if it already has > its own turnstile, what the > > meaning of putting of turnstile to free list only for regrabbing it > later. > > This is definitely a question for freebsd-hackers@... > > Cheers, > > Matthew > > > This is put to free list - take it from free list . A possible another method is to use dispose - allocate pair . When dispose - allocate was taking long time ( in old times ) , the "put to free - take from free" method was in use . I am not saying that the reason of the use in your case is that , but there was such a method in older times . Mehmet Erol Sanliturk
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOgwaMsNdWRCeq9MM1R8E4%2Bdb==WM9U3cnHpwgXu0hKoMknXhQ>