From owner-freebsd-current@FreeBSD.ORG Tue Nov 15 19:12:55 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 6783F1065676; Tue, 15 Nov 2011 19:12:55 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 62ECD8FC14; Tue, 15 Nov 2011 19:12:53 +0000 (UTC) Received: by faar19 with SMTP id r19so1110741faa.13 for ; Tue, 15 Nov 2011 11:12:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=2uIbwp9M5vN9TX5MkKv1lhBj241OGvGk16T1ErLK4cg=; b=TVFtCOPGe4hDo1n+I1a66EBOGpvyG5R2V/P51JWyMwzi09KeSRYeZqQqAIMbz+M93N V8WpZgzmekxZejb1HpEwtAd8QCcCzeez3YjJWDtRopI4BipcHXCW7NAIL3QhcRfmei8l DhbL1Cj8Avm5Q7LBiuvopMv27BmccooCLRdx8= MIME-Version: 1.0 Received: by 10.152.104.236 with SMTP id gh12mr18268308lab.49.1321384372897; Tue, 15 Nov 2011 11:12:52 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.152.21.104 with HTTP; Tue, 15 Nov 2011 11:12:52 -0800 (PST) In-Reply-To: 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> <4EB81942.70501@rice.edu> <20111107193516.GA50300@deviant.kiev.zoral.com.ua> Date: Tue, 15 Nov 2011 20:12:52 +0100 X-Google-Sender-Auth: eAM_R21KiG3wSzCVbpTbghg0Rpg Message-ID: From: Attilio Rao To: mdf@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "K. Macy" , Alan Cox , Andriy Gapon , freebsd-current@freebsd.org, Benjamin Kaduk , Kostik Belousov , 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: Tue, 15 Nov 2011 19:12:55 -0000 2011/11/15 : > On Tue, Nov 15, 2011 at 10:15 AM, Attilio Rao wrote= : >> 2011/11/7 Kostik Belousov : >>> On Mon, Nov 07, 2011 at 11:45:38AM -0600, Alan Cox wrote: >>>> Ok. =C2=A0I'll offer one final suggestion. =C2=A0Please consider an al= ternative >>>> suffix to "func". =C2=A0Perhaps, "kbi" or "KBI". =C2=A0In other words,= something >>>> that hints at the function's reason for existing. >>> >>> Sure. Below is the extraction of only vm_page_lock() bits, together >>> with the suggested rename. When Attilio provides the promised simplific= ation >>> 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 the >> 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. >> >> 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. > > Out of curiosity, why are function names explicitly spelled out in > panic and log messages, instead of using %s and __func__? =C2=A0I've seen > this all around FreeBSD, and if there's no reason otherwise, I'd just > as soon change to a version that doesn't need updating when the > function names change. I prefer the __func__ stuff as well but bde isn't in favor of it because it is more difficult to grep for the message in that case. I'm not sure I'd buy his point on this, honestly, but that is why. Attilio --=20 Peace can only be achieved by understanding - A. Einstein