From owner-freebsd-current@FreeBSD.ORG Sun Nov 6 16:42:08 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAA83106566B; Sun, 6 Nov 2011 16:42:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 447498FC15; Sun, 6 Nov 2011 16:42:07 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id pA6Gg49g030995 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 6 Nov 2011 18:42:04 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id pA6Gg4dB055635; Sun, 6 Nov 2011 18:42:04 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pA6Gg4x6055634; Sun, 6 Nov 2011 18:42:04 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 6 Nov 2011 18:42:04 +0200 From: Kostik Belousov To: mdf@freebsd.org Message-ID: <20111106164204.GY50300@deviant.kiev.zoral.com.ua> References: <4EB40015.5040100@rice.edu> <20111104153004.GK50300@deviant.kiev.zoral.com.ua> <4EB4095D.3030303@rice.edu> <20111104160339.GM50300@deviant.kiev.zoral.com.ua> <20111105141306.GW50300@deviant.kiev.zoral.com.ua> <20111105151530.GX50300@deviant.kiev.zoral.com.ua> <4EB595FA.4020500@rice.edu> <20111106124331.GP50300@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IUUPtLpdNqNE81UU" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: "K. Macy" , Alan Cox , Andriy Gapon , freebsd-current@freebsd.org, Benjamin Kaduk , Penta Upa Subject: Re: vm_page_t related KBI [Was: Re: panic at vm_page_wire with FreeBSD 9.0 Beta 3] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Nov 2011 16:42:08 -0000 --IUUPtLpdNqNE81UU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 06, 2011 at 07:22:51AM -0800, mdf@freebsd.org wrote: > On Sun, Nov 6, 2011 at 4:43 AM, Kostik Belousov wro= te: > > Regarding the _vm_page_lock() vs. vm_page_lock_func(), the mutex.h has > > a lot of violations in regard of the namespaces, IMO. The __* namespace > > is reserved for the language implementation, so our freestanding program > > (kernel) ignores the requirements of the C standard with the names like > > __mtx_lock_spin(). Using the name _vm_page_lock() is valid, but makes > > it not unreasonable for other developers to introduce reserved names. > > So I decided to use the suffixes. vm_map.h locking is free of these > > violations. >=20 > I'm pretty sure that when the C standard says, "the implementation", > they're referring to the compiler and OS it runs on. Which makes the > FreeBSD kernel part of "the implementation", which is precisely why so > many headers have defines that start with __ and then, if certain > posix defines are set, also uses non-__ versions of the name. For libc providing parts, required by standard, you are right. But our kernel is a freestanding program using a compiler, so in-kernel uses of the reserved namespace is a violation. --IUUPtLpdNqNE81UU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk62uNsACgkQC3+MBN1Mb4gqpQCfQdG7yhZaVm0lbGb75HOrT0jJ YQAAoN1NhUXeIIzgUP2IXY/JRoZQq/MX =nf9h -----END PGP SIGNATURE----- --IUUPtLpdNqNE81UU--