Received: by 10.223.185.116 with SMTP id b49csp562647wrg; Fri, 23 Feb 2018 03:16:54 -0800 (PST) X-Google-Smtp-Source: AH8x227mtbofsEsfPRT757ocOfimc/TSK6kyTDuOcSAgq0kSucuqOYFCW3wcPzW4afykx9AqRy7y X-Received: by 10.99.185.7 with SMTP id z7mr1203528pge.123.1519384614607; Fri, 23 Feb 2018 03:16:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519384614; cv=none; d=google.com; s=arc-20160816; b=mAFWHYA2RyEJgGnqF1WHh3iP643axmY1fEyE4CHu3xPKVvVoh6/V4pedDdXvz/wvIe /nx3FP3+GXjhM8c2wX2HznRxcUGqs/sCB9UoFpm/ZwLSNK3otV/Actbmhlf0ksMtK+tk aOA9snXV0anZD0qiPnkfOuov9c6E0O0X5pei/O43MSi6ew7f/+sAj/TAb9M92qe+YTjA VFHh4HdomVjduPcEBWpRQvPhsd4iTI6ZI2cFlRfftIOLbpUDleyGYdwJbT2gr5xGUexQ 6brtft3YUXlDAXvJzLuFycMwrzRsMh+IZMhtjFsM/MUQ1l6f5Uk8W9toi8XFNYJDcbK9 bV6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=gnkJEPiNS5eNF4BgS59Vo/1VQ1EeYcKn+GCbJJ2b3zY=; b=ExGbOjQPD1xmbQdLsc0UVewdDPwwsaR5CVjcMSVPzn00AQI1XjDNJeiCczEhKzKKUJ yUPPguhwP/eghcq6tgtKkc7XUuqFE5N1eTn2x0JuCNRF4D21NhYjIX5eZyhfIqNvQxEW tFQDC8AJbuzezhDKMg71MEKSiKdJv5mnkBD9vMv6nCd9XrwD+kAdC3uUER5sgOe3CYsY R2+Dr5nSueOo6+isj2jnWf0G/ChiZ37IZFPIxgAGFLjel3SXTNJSC3R5uEFauTrS4CMZ lWjm/TRM8BiBOOBNSnaDnCVWCtJLZauwDiTv2jAmrgEOE9pf5bX2azf5Evt/khVfoeR+ lakQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=mpskOQNP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10-v6si1615903plu.362.2018.02.23.03.16.34; Fri, 23 Feb 2018 03:16:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=mpskOQNP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751915AbeBWLPJ (ORCPT + 99 others); Fri, 23 Feb 2018 06:15:09 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:52026 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751883AbeBWLPI (ORCPT ); Fri, 23 Feb 2018 06:15:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gnkJEPiNS5eNF4BgS59Vo/1VQ1EeYcKn+GCbJJ2b3zY=; b=mpskOQNPZ7jA5o7GWoGVSGCbb GaAYbvrNXmZQm5yzOxw2tu+D8/eOZsVqbhBoy6nqjY5J99zq0wmzW+PhlDoi6RYlfFjH15iwNi6oa GJQuXPAFpR5JFflM8BMclE4plFlNVXgeZ+U3VhRSUvnMkDE5JSB8jwujCoCqN2AaSea6JbhF93/iQ abLTCWhg60GrkhSLWEWWKQ6YWJ7vl8wY5Yn1sjj90ScXq99V11M35XSaMgSxtMvVylrA5xys2uE3L HUasOd9ZYYFFu30YA/7F6NtrbV7WJVQa/MmN5S9I3pknWLX+ITIN1E3TXR1UwEWpPrVLihPvrOZmT Dg+LmTDIg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1epBJi-0002kB-SF; Fri, 23 Feb 2018 11:15:07 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 4604B2029FD41; Fri, 23 Feb 2018 12:15:05 +0100 (CET) Date: Fri, 23 Feb 2018 12:15:05 +0100 From: Peter Zijlstra To: Boqun Feng Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrea Parri Subject: Re: [RFC tip/locking/lockdep v5 05/17] lockdep: Extend __bfs() to work with multiple kinds of dependencies Message-ID: <20180223111505.GU25181@hirez.programming.kicks-ass.net> References: <20180222070904.548-1-boqun.feng@gmail.com> <20180222070904.548-6-boqun.feng@gmail.com> <20180222142614.GR25201@hirez.programming.kicks-ass.net> <20180222151210.jwxjchywk4jfecyf@tardis> <20180222153034.GO25181@hirez.programming.kicks-ass.net> <20180222155143.GV25235@hirez.programming.kicks-ass.net> <20180222163120.zhytq7yezny4e7mj@tardis> <20180223050209.qy46njbj7phvuxqy@tardis> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180223050209.qy46njbj7phvuxqy@tardis> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 23, 2018 at 01:02:09PM +0800, Boqun Feng wrote: > > entry->have_xr = !(has_nn(entry->dep) || (!is_rr && has_rn(entry->dep))); > > := !has_nn(entry->dep) && (is_rr || !has_rn(entry->dep)) > > > > so it seems that we have to introduce is_{nn,rn,nx}(), I'm not sure > introducing three one-off helpers is a good direction to go. One benefit > of using pick_dep() is that we can keep the whole logic in one function. > Thoughts? Urgh, I see... Damn this is confusing, I'm sure there's something simple we're missing. Let me go stare at the earlier patches again.