From owner-freebsd-arch@FreeBSD.ORG Thu Sep 25 18:31:45 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF1517A; Thu, 25 Sep 2014 18:31:44 +0000 (UTC) Received: from mail-lb0-x22a.google.com (mail-lb0-x22a.google.com [IPv6:2a00:1450:4010:c04::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 772C7C41; Thu, 25 Sep 2014 18:31:43 +0000 (UTC) Received: by mail-lb0-f170.google.com with SMTP id n15so1437061lbi.15 for ; Thu, 25 Sep 2014 11:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=oWfi+gITm3ANQ9NgkcojSr+H/516WMV1OB1KIJX/7K0=; b=TjJfq+leWSTjAHUWNk62j0ilwtghZXcHWKKUUWSzeRfES/zeb+p1TGES8kwUuJq5j4 k0ricTRC+yeXpCnFCnUscdT8mLWijsVjSBO0lL2u+zt/fbPllqW8MR9XeyS0N+Zl911+ Enl67EqXDGvzyj2E1Th1bKwxzicsn+tXtPpSiPLDOWcQ7b1vAYe/9I2QqzBvF2Y46wTx CF+d0vrU6QmggVwjAjyNgRDqNCvLqpHIrc77mLPZiT1AQHcdSX1I9ZiAfmPCFQDhVM6M uYOPrTOQeHQ5U2ChUDfnvzLP5qhyGa7lYKrECBaNAI7dkqJG21uQZRBWO3Xg/gckk8Jb 3JBQ== MIME-Version: 1.0 X-Received: by 10.152.9.37 with SMTP id w5mr15255500laa.28.1411669901256; Thu, 25 Sep 2014 11:31:41 -0700 (PDT) Sender: kmacybsd@gmail.com Received: by 10.25.86.18 with HTTP; Thu, 25 Sep 2014 11:31:41 -0700 (PDT) In-Reply-To: References: <54236CD6.4050807@FreeBSD.org> <5424392D.9030201@FreeBSD.org> <1411668571.66615.247.camel@revolution.hippie.lan> Date: Thu, 25 Sep 2014 11:31:41 -0700 X-Google-Sender-Auth: kQWyBFRKdWHYfZ36VW89M-8v0-U Message-ID: Subject: Re: KASSERT_WARN for asserting malloc(M_WAITOK) not in a non-sleepable thread From: "K. Macy" To: Justin Hibbits Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Davide Italiano , Adrian Chadd , Bryan Drewery , Ian Lepore , "freebsd-arch@freebsd.org" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2014 18:31:45 -0000 > > > I like my bikeshed a nice royal blue. At a previous job we used > ASSERT and VERIFY macros. VERIFY was comparable to this (warn if > condition not met, don't panic), so how about KVERIFY() (I'll also > support KWARN, but I think KVERIFY() conveys a better message by > name). > Assert has a long established meaning in C that if a condition is not met, abort _now_. So his reservations about KASSERT_WARN aren't just spouting off. And while bikesheds are in fact all too prevalent your flippant comment about the color of the bikeshed is rather condescending and does not contribute positively to the tone of the discussion. Either of your suggestions is fine and a clear improvement over the initial name. KVERIFY would have clearer implications that this isn't a simple log message. Thanks for presenting these alternatives. -K