From owner-svn-src-head@FreeBSD.ORG Mon May 13 16:58:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3BE4F592 for ; Mon, 13 May 2013 16:58:05 +0000 (UTC) (envelope-from will@firepipe.net) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) by mx1.freebsd.org (Postfix) with ESMTP id 0E6EA8F9 for ; Mon, 13 May 2013 16:58:04 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id x12so12651306ief.40 for ; Mon, 13 May 2013 09:58:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=j/euV2TD5CtvzDWR4664HMqKmfZ2ytMuVPpg9CN7+U8=; b=XQPs1Jaj2OweCEGPrVoPLq23o9ucWIHTB3TamfDrwWbZWsE5uJpy03peE3NIalbnx0 SxE8o6TFKoQNkOJh4/uRr6c7r4xzXSvQBsiIgZlFJZ/w2avJUuM34NTaNremGnpMI1AC U3iH40F6x58/pFGfp9557JVW/vo0aDXwff8qkapbDbw+fEuGpusOj/Rw1f1jTZ4ktty3 sozjKp57PtKlM2azQvFfW2mSGRDYwAhzfD3E/7mt4UpfVsUcxVxEuyeROP9kG5Vuw1Vq KJuGfZglarRz+aXrTXVzND57c2GWcJXu/xKLPWm+YhALjN0Gpwf9J860S3TwQAT/tNu2 LyTg== MIME-Version: 1.0 X-Received: by 10.50.103.102 with SMTP id fv6mr10528310igb.6.1368464284683; Mon, 13 May 2013 09:58:04 -0700 (PDT) Received: by 10.231.49.74 with HTTP; Mon, 13 May 2013 09:58:04 -0700 (PDT) In-Reply-To: <518F320D.3070304@mu.org> References: <201305091628.r49GSI33039873@svn.freebsd.org> <518F320D.3070304@mu.org> Date: Mon, 13 May 2013 10:58:04 -0600 Message-ID: Subject: Re: svn commit: r250411 - in head/sys: conf kern sys From: Will Andrews To: Alfred Perlstein X-Gm-Message-State: ALoCoQkzS5AjCQI3kJ4iNcuZzN5cNMzHOT0ltkJI2jxgKrd8koF+PkJj29BFlqeGnMdVEUB4HZ04 Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Marcel Moolenaar , jhb@freebsd.org, svn-src-all@freebsd.org, alfred@freebsd.org, attilio@freebsd.org, src-committers@freebsd.org, Jeff Roberson , svn-src-head@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 May 2013 16:58:05 -0000 On Sun, May 12, 2013 at 12:09 AM, Alfred Perlstein wrote: > Can we just admit to ourselves that tweaks to debugging macros/printing > and WITNESS are our kernel developer's "bikeshed zone" and get over the > fact that people's needs may diverge and changing non-default behavior in > non-critical paths is not going to be the death of the kernel as we know it? > > I could certainly believe that this sort of thing needs long and thorough > discussion if it wasn't the equivalent of style tweaks to manpages. > > Let's leave the long and lengthy discussions to things that matter such as > standards compliance, ABI, API and really cool performance and stability > stuff. Except that this is *not* the equivalent of style tweaks. I'm not sure how you got that from Jeff's email. False positive LORs results in people ignoring all LORs, including real ones. And that impacts stability. Especially if you are trying to implement performance improvements or fix bugs; in that case, the LORs act as a safeguard against violating existing object relationship assumptions. Having worked on ZFS for a while, I can say that many (if not most) of the LORs reported there that are false positives are because the locks represent objects that are frequently and legitimately related to each other in reverse orders, due to reuse of object types at different points in the overall hierarchy. So, I agree that the biggest issue is that witness's model of comparing strings is insufficient for representing more complex lock relationships. In ZFS, in most cases, the locks are acquired after having already (in debug builds) checked these relationships. It seems appropriate, therefore, that witness should be improved by adding the ability to bless specific object relationships on a per-lock entry basis, so that we continue to be notified about *legitimate* LORs, at every call site and between every pair of object types. It also seems best to add a new API for this purpose, so that it can be used regardless of which lock type is being used, without having to modify all existing lock calls. This does mean that code in FreeBSD would need to independently verify the object relationships, but doing so is, IMHO, a lot easier to improve upon than folding this functionality into existing APIs by adding more arguments. --Will.