From owner-svn-src-all@FreeBSD.ORG Sat May 11 15:05:32 2013 Return-Path: Delivered-To: svn-src-all@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 68F26633; Sat, 11 May 2013 15:05:32 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-ia0-x233.google.com (mail-ia0-x233.google.com [IPv6:2607:f8b0:4001:c02::233]) by mx1.freebsd.org (Postfix) with ESMTP id 1536DBFE; Sat, 11 May 2013 15:05:32 +0000 (UTC) Received: by mail-ia0-f179.google.com with SMTP id h37so635038iak.38 for ; Sat, 11 May 2013 08:05:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=WriXFwawu8xaNzxg9M/MF3yVa/R9cWVHL1WnPJzMBkc=; b=JcT6CFrwO500KOqVPUBQJATlLPhInaYWqA0DnDLq5W4CvRlXzhgSyV2JwkDqygizlQ hsnYLmUjj0S5WL9VZZMkpl2vc0cO2L3JXuClwCXwdgvHUcBBjM45EvX9O+3BDQMbfP61 2Tqek92EabKZE2NjNaD05H62JcherGJ0kE4ex9Q8ugWmOAR/JKbkO2nPqTf0Y9Szkp0/ k3vN5UO8MKH7OKmxBCo4s7NrGZJW5UeSGEy+trfj/JSY50C5vpuq0xQT1V2nLXbQTyS3 JlmD25qa1Tpa2xwVD9hXJFP7r9pxKBH2rD7FgbXLxZiyZuIDae5UHlb00P8jEb5SO2t4 N2ag== MIME-Version: 1.0 X-Received: by 10.50.7.36 with SMTP id g4mr5380683iga.64.1368284731730; Sat, 11 May 2013 08:05:31 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.42.117.134 with HTTP; Sat, 11 May 2013 08:05:31 -0700 (PDT) In-Reply-To: References: <201305091628.r49GSI33039873@svn.freebsd.org> <201305101211.35808.jhb@freebsd.org> <6CBEB766-087B-41F4-B549-2D60F4FD2701@xcllnt.net> <201305101533.26992.jhb@freebsd.org> Date: Sat, 11 May 2013 17:05:31 +0200 X-Google-Sender-Auth: wEMri70znE8dEzV9sK4n-COjvJk Message-ID: Subject: Re: svn commit: r250411 - in head/sys: conf kern sys From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org, Marcel Moolenaar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 May 2013 15:05:32 -0000 On Sat, May 11, 2013 at 4:34 PM, Attilio Rao wrote: > On Fri, May 10, 2013 at 9:33 PM, John Baldwin wrote: >> On Friday, May 10, 2013 2:51:20 pm Marcel Moolenaar wrote: >>> >>> On May 10, 2013, at 9:11 AM, John Baldwin wrote: >>> >>> > On Friday, May 10, 2013 11:46:54 am Marcel Moolenaar wrote: >>> >>> >>> >>> 2) vnode locks from a local filesystem that report a LOR with a "devfs" >>> >>> vnode. Typical reports are either "ufs" -> "devfs" or in some cases >>> >>> "ufs" -> "devfs" -> "ufs". As with 1), I would much rather tag the >>> >>> offending location than to disable all WITNESS checking on vnode locks. >>> >> >>> >> With more file system types in use, this will get mixed up with the >>> >> other file systems and noise you get is rather severe. It is a big >>> >> problem for us at Juniper. >>> > >>> > Note, it is very specific that the second lock is always "devfs". I think >>> > that points to this being isolated to a few specific places, not a generic >>> > ordering problem. >>> >>> Alas, that's not the case. These LORs are reported between ufs and unionfs, >>> or ufs and isofs, etc. It's not just between something and devfs. >> >> Ugh, I have only seen them with devfs so had presumed them to be more >> localized (and thus more easily targeted). In that case your change >> may be as fine-grained as we can get. I would also like to still keep >> WITNESS checking between vnode locks and other lock types, and LK_NOWITNESS >> would remove that, so between your change and Attilio's approach I do >> prefer yours. >> >>> I'm not sure the only options we have are to ignore the problem >>> or implement a general fix. If we set out to silence witness for >>> the known false positives then it's ok to handle them on a case >>> by case basis. We'll see patterns soon enough and then re-code >>> the solutions in terms of those patterns. If we're lucky we see >>> a single general solution, but if not, then it's fine to have a >>> handful of special case. The worse we can do is not address it >>> at all. >> >> I was assuming that the reversals were far more specific, and knowing about >> other false positives like the dirhash one, I want a generic way to do more >> fine-grained marking of false positives. If there were only a few places we >> would need to mark to fix the reversals you see, then I would prefer the >> suspend/resume approach for your case. However, the reversals you are masking >> sound too widespread to support that. > > The solution to this is what I proposed: pass down a LK_NOWITNESS for > instances where you don't want to check for witness. > This is per lock-call. > You localize the fix to the instance you want to shut down and you > skip witness for every false-positive. > When you commit the LK_NOWITNESS you mention explicitely the reason > why the reported LOR is a false positive so it is also documented on > svn. > > I still don't understand what you are objecting. Marcel objections' > were completely no-sense (Don't want to involve Witness) but at least > I expect some decent one by you. And finally, all the logic to do this seems already implemented. I didn't recall that. See this: http://svnweb.freebsd.org/base?view=revision&revision=179554 What is missing is similar logic for sx(9) and rwlock(9). We can simply add _flags() variant of such functions if we need it. But Marcel's approach is not helping on that side as well, if not for a simple red-herring effect. Attilio -- Peace can only be achieved by understanding - A. Einstein