From owner-svn-src-all@FreeBSD.ORG Sun Dec 14 10:58:55 2014 Return-Path: Delivered-To: svn-src-all@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 C2879B95; Sun, 14 Dec 2014 10:58:55 +0000 (UTC) Received: from dchagin.static.corbina.net (5.45.224.107-red.dhcp.yndx.net [5.45.224.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "dchagin.static.corbina.net", Issuer "dchagin.static.corbina.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 32E73A86; Sun, 14 Dec 2014 10:58:54 +0000 (UTC) Received: from dchagin.static.corbina.net (localhost [127.0.0.1]) by dchagin.static.corbina.net (8.14.9/8.14.9) with ESMTP id sBEA7lHA007351 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 14 Dec 2014 13:07:48 +0300 (MSK) (envelope-from dchagin@dchagin.static.corbina.net) Received: (from dchagin@localhost) by dchagin.static.corbina.net (8.14.9/8.14.9/Submit) id sBEA7lT5007350; Sun, 14 Dec 2014 13:07:47 +0300 (MSK) (envelope-from dchagin) Date: Sun, 14 Dec 2014 13:07:47 +0300 From: Chagin Dmitry To: Benjamin Kaduk Subject: Re: svn commit: r275751 - in head: share/man/man9 sys/kern sys/sys Message-ID: <20141214100747.GA7216@dchagin.static.corbina.net> References: <201412132100.sBDL0BvR094009@svn.freebsd.org> <20141213213111.GA2070@dchagin.static.corbina.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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: Sun, 14 Dec 2014 10:58:55 -0000 On Sat, Dec 13, 2014 at 10:06:06PM -0500, Benjamin Kaduk wrote: > On Sat, 13 Dec 2014, Chagin Dmitry wrote: >=20 > > > Can you please say a bit more about why this is desired and what it w= ill be > > > used for? > > > > > If the kernel has been compiled with INVARIANTS _init() will assert tha= t the > > lock has not been initialized multiple times. _NEW flag is needed to sk= ip this. >=20 > Yes, I have run into that assertion a few times; it helped me fix bugs in > my code. >=20 > > as _init() does expect you to zero lock first. > > it should be used carefully, when you are sure its safe, > > to avoid bzero'ing lock struct. ugh >=20 > I guess I'm still confused as why skipping the zeroing is useful. > Wouldn't it be a good practice to always zero? useful? no >=20 >=20 > Do you have any specific places in mind where you want to use this > functionality? That might help me understand. >=20 sure, next commit --=20 Have fun! chd