Date: Fri, 18 Nov 2011 13:01:03 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Attilio Rao <attilio@freebsd.org> Cc: mdf@freebsd.org, "K. Macy" <kmacy@freebsd.org>, Alan Cox <alc@rice.edu>, Andriy Gapon <avg@freebsd.org>, freebsd-current@freebsd.org, Benjamin Kaduk <kaduk@mit.edu>, Penta Upa <bsdboot@gmail.com> Subject: Re: vm_page_t related KBI [Was: Re: panic at vm_page_wire with FreeBSD 9.0 Beta 3] Message-ID: <20111118110103.GE50300@deviant.kiev.zoral.com.ua> In-Reply-To: <CAJ-FndAULb9r-FVaBparSJVtoSEQuX7%2BwhCoBNdQi7n%2B=UpEdA@mail.gmail.com> References: <20111105151530.GX50300@deviant.kiev.zoral.com.ua> <4EB595FA.4020500@rice.edu> <20111106124331.GP50300@deviant.kiev.zoral.com.ua> <4EB81942.70501@rice.edu> <20111107193516.GA50300@deviant.kiev.zoral.com.ua> <CAJ-FndDsrVk7EjjtE=QuhaJE1_k7Q1BvQ%2BxriJPnGzLXJQr1sg@mail.gmail.com> <20111116084542.GY50300@deviant.kiev.zoral.com.ua> <CAJ-FndAwWzFJgpCdaaE=YkipZSCtE6Vb8-LEK2_qS=bVhRM3OQ@mail.gmail.com> <20111118105224.GB50300@deviant.kiev.zoral.com.ua> <CAJ-FndAULb9r-FVaBparSJVtoSEQuX7%2BwhCoBNdQi7n%2B=UpEdA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--bmCMfij1YEBRfNho Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 18, 2011 at 11:56:55AM +0100, Attilio Rao wrote: > 2011/11/18 Kostik Belousov <kostikbel@gmail.com>: > > On Fri, Nov 18, 2011 at 11:40:28AM +0100, Attilio Rao wrote: > >> 2011/11/16 Kostik Belousov <kostikbel@gmail.com>: > >> > On Tue, Nov 15, 2011 at 07:15:01PM +0100, Attilio Rao wrote: > >> >> 2011/11/7 Kostik Belousov <kostikbel@gmail.com>: > >> >> > On Mon, Nov 07, 2011 at 11:45:38AM -0600, Alan Cox wrote: > >> >> >> Ok. =9AI'll offer one final suggestion. =9APlease consider an al= ternative > >> >> >> suffix to "func". =9APerhaps, "kbi" or "KBI". =9AIn other words,= something > >> >> >> that hints at the function's reason for existing. > >> >> > > >> >> > Sure. Below is the extraction of only vm_page_lock() bits, togeth= er > >> >> > with the suggested rename. When Attilio provides the promised sim= plification > >> >> > of the mutex KPI, this can be reduced. > >> >> > >> >> My tentative patch is here: > >> >> http://www.freebsd.org/~attilio/mutexfileline.patch > >> >> > >> >> I need to make more compile testing later, but it already compiles > >> >> GENERIC + modules fine on HEAD. > >> >> > >> >> The patch provides a common entrypoint, option independent, for both > >> >> fast case and debug/compat case. > >> >> Additively, it almost entirely fixes the standard violation of the > >> >> reserved namespace, as you described (the notable exception being t= he > >> >> macro used in the fast path, that I want to fix as well, but in a > >> >> separate commit). > >> >> > >> >> Now the file/line couplet can be passed to the "_" suffix variant of > >> >> the flag functions. > >> > Yes, this is exactly KPI that I would use when available for the > >> > vm_page_lock() patch. > >> > > >> >> > >> >> eadler@ reviewed the mutex.h comment. > >> >> > >> >> Please let me know what you think about it, as long as we agree on = the > >> >> patch I'll commit it. > >> > But I also agree with John that imposing large churn due to the elim= ination > >> > of the '__' prefix is too late now. At least it will make the change > >> > non-MFCable. Besides, we already lived with the names for 10+ years. > >> > > >> > I will be happy to have the part of the patch that exports the mtx_X= XX_(mtx, > >> > file, line) defines which can be used without taking care of LOCK_DE= BUG > >> > or MUTEX_NOINLINE in the consumer code. > >> > >> Ok, this patch should just add the compat stub: > >> http://www.freebsd.org/~attilio/mutexfileline2.patch > > Am I right that I would use mtx_lock_(mtx, file, line) etc ? > > If yes, I am fine with it. >=20 > Yes that is correct. >=20 > However, I'm a bit confused on one aspect: would you mind using > _mtx_lock_flags() instead? > If you don't mind the "underscore namespace violation" I think I can > make a much smaller patch against HEAD for it. _mtx_lock_flags() is fine. The reserved names start with __ or _[A-Z]. >=20 > Otherwise, the one now posted should be ok. >=20 > Attilio >=20 >=20 > --=20 > Peace can only be achieved by understanding - A. Einstein --bmCMfij1YEBRfNho Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk7GOu8ACgkQC3+MBN1Mb4jqwQCg3iRmUyrlvvsSrzbB1E9IjIqf nDoAmgPXNbLBOTdyBuBGte9/RSnsoRBJ =z+XH -----END PGP SIGNATURE----- --bmCMfij1YEBRfNho--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111118110103.GE50300>