From owner-freebsd-questions@freebsd.org Sat Jun 4 22:59:30 2016 Return-Path: Delivered-To: freebsd-questions@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 BE079B6A246 for ; Sat, 4 Jun 2016 22:59:30 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from mail-oi0-x233.google.com (mail-oi0-x233.google.com [IPv6:2607:f8b0:4003:c06::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 80D351E5E; Sat, 4 Jun 2016 22:59:30 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: by mail-oi0-x233.google.com with SMTP id j1so177284860oih.3; Sat, 04 Jun 2016 15:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=WS1BdXvF4KnrUChvmTo/jsoUWgR5Zvg/ox8DvmT7ftI=; b=yctacsvcI92MJcyRoMjQPM0ke1HjFiYgLthBxadTbFs9cAFk+71/IFzrGarEnBOYDj GH8HznrLN3WX3+NzSivumxdw+Kf8Z5xDQVU1O49E2z//iuC6rFVwR2eXtv5R/t9lcOT4 NcFsAnvpO/gdFZGyNvg2zZ1ZxSxqdccronHczdNgWmMWjTxKCIB5EqB3f+OCo3aPijAt MR5REeaAZv5Iblse5NUZb9X6MfgqgRX/apUm/mirtZNOY3mmWB3Z6pL/EiYoFPVMBCbb vtOCvlvENS8L3XK2XNzQG88RPe1m9cdn2KEjeAS7Y70ES++UhKpv2LwbHwvxpDTCh17d Omyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=WS1BdXvF4KnrUChvmTo/jsoUWgR5Zvg/ox8DvmT7ftI=; b=LbsDVrGWviIqv8mJcjIGy+jY38L/6jWmEEK6uUjYrmMhpPxYpQWG6Lw/GWLGWs+B2T Zb3zEZs5n09q1mvtIH+x9BRf3bJuh6n9hg++Hy97MFmZc0tXkzBAsKnYFXjxCoPkCYYc WvNX1fCF2qsLHTiCHMQby8pa5hcxOvV15U3VLEhbF9MoPNjlpV5qWUISCKdfS+kFA1to B4zSplAVWIP/BEvdr9xnJTu3javzh17E4MVMzDkFO/zMmuG40lvKoKDzyqOWIDtT5QtY 6mYp2TKdBsDysk0vet+oLCeIgJWSPXRZtCjEgplu8/M/P6cLyw4KVagQ2n9PrmGW9jhP /85Q== X-Gm-Message-State: ALyK8tJVe7dhfz5v9QgO/nz9Ut+EeU3v7MPXHsW3yVaL7JqQn5Ohyuq9/0Ett/8HUR8gDnzYTdgauXphywUjtw== X-Received: by 10.202.241.67 with SMTP id p64mr4469928oih.197.1465081169838; Sat, 04 Jun 2016 15:59:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.47.66 with HTTP; Sat, 4 Jun 2016 15:59:29 -0700 (PDT) In-Reply-To: <57534A45.8030802@FreeBSD.org> References: <1465068474.241692968@f361.i.mail.ru> <57534A45.8030802@FreeBSD.org> From: Mehmet Erol Sanliturk Date: Sat, 4 Jun 2016 15:59:29 -0700 Message-ID: Subject: Re: Relevant mailing list To: Matthew Seaman Cc: FreeBSD Questions Mailing List , bltsrc@mail.ru Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jun 2016 22:59:30 -0000 On Sat, Jun 4, 2016 at 2:38 PM, Matthew Seaman 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