From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 15 16:39:58 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23A7792D; Thu, 15 Nov 2012 16:39:58 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3821C8FC08; Thu, 15 Nov 2012 16:39:56 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id j13so1730127lah.13 for ; Thu, 15 Nov 2012 08:39:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Dm8wzhvVjwZHDAUWyfOaV34sC0YK7PLTTtxqJBJVjVY=; b=amuffdSsc1OvbxmqYBOusT1dRYIxigWVRJhkxeOAz6eW/B4XtnKqqZVLyPoIx0ksx1 xOYfhsZDY2wjXAheIZsS82CYN0m+h2UNBltPaP2e8MbwONrUTTrS9KhVaMXr0qIDZCW9 uxEMUQOR0EVPaNOZogn16DGk+/pH8cH4cH+70NovUaDTMnQH6N+UPQKJljnUmcxFXxfX naN3IGKih5RzoK3CqdTGicBr3to3GdW9pzFLN6frmANy16zceCzn6b6N59z5KdAI+7cz 13/3LLffBkLS6It5WH/LMoaRvyXQcCk14Vm9edOWF1Mco+zVxWJHtf2oCnw7JyXetIkC 67XA== MIME-Version: 1.0 Received: by 10.152.132.3 with SMTP id oq3mr1598733lab.18.1352997596012; Thu, 15 Nov 2012 08:39:56 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.112.134.5 with HTTP; Thu, 15 Nov 2012 08:39:55 -0800 (PST) In-Reply-To: References: Date: Thu, 15 Nov 2012 16:39:55 +0000 X-Google-Sender-Auth: l4M5Za3t4iOfBIVQh5SEs-Izwcs Message-ID: Subject: Re: [RFQ] make witness panic an option From: Attilio Rao To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-hackers@freebsd.org" , Giovanni Trematerra , freebsd-arch@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 16:39:58 -0000 On 11/15/12, Adrian Chadd wrote: > On 15 November 2012 05:27, Giovanni Trematerra > wrote: > >> I really do think that is a very bad idea. >> When a locking assertion fails you have just to stop your mind and >> think what's wrong, >> no way to postpone on this. > > Not all witness panics are actually fatal. For a developer who is > sufficiently cluey in their area, they are quite likely able to just > stare at the code paths for a while to figure out why the > incorrectness occured. The problem is that such mechanism can be abused, just like the BLESSING one and that's why this is disabled by default. I believe having a mechanism to use printf for witness is not a good idea. > As I said, I do this primarily so I can sprinkle lots of lock > owned/unowned assertions around my driver(s) and then use that to > catch when things aren't being correct. Having to reboot upon _every_ > lock assertion quickly got old. You can use it as a local patch then. This is not really the usual way to develop locking policies. Attilio -- Peace can only be achieved by understanding - A. Einstein