Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5168703yba; Mon, 13 May 2019 06:34:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqx78Ez5y5U+DGF33DfbIb95CLui1YdRR1OuWHPXh7tGb8oB8kf7LqeD0iKxxnbwvIU9gH1K X-Received: by 2002:aa7:8d98:: with SMTP id i24mr33544538pfr.8.1557754447091; Mon, 13 May 2019 06:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557754447; cv=none; d=google.com; s=arc-20160816; b=bL6kPjZUaWRjdOcHCJ9fzkTCRVLuv0GFRi/EAoDi1WB4lX1CNWrn1IYLJ93RWfaSuE spRnYVP7FvtvShwkZU6SVEEd6EXoL1aN0cG6Gn/4ygw9izXhTOPTazy5Sie9EWadm1aE 3gAY2TndBVVc0nGUUOgjlEmacnZ7j1JDT5JBCl1V6oz61lciZ6/X8GjTXz9JpGzscUFC YJSAsb2jwREjnLxVMRzUbTxRVS7BJrqbupnz+zZk259t6cnc34OjiDnduoMVSZQ02jo6 HXe7fCoEsl937mP4hiH6zHV6W/E30mrOFU1siJ32+9gIukkwmgqSvUXZccsSoLdPinJ/ IHcg== 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; bh=kIFwTuS2Cq6ZYIK7P/ywG/BfaUTgrMlQGg1qCWu+uzI=; b=JmjkCvdCs+hj0XeLpem5f97msZjQING0AOP9bIRcEZvcIyabrhKS9lmHN814bTFZQ8 ubmaL4ZUC2gRdFJyBPJSvjw/t5+jy6Q4wDZlfGfzaxE/Ds96YSpqPMhJBgYhsmjplHtU 3od1XfQEUXIhyor2Z5BnAIWPUR85ig952ZpRT9BwyNUgSJC64izubnFkU+9pMxNOMuWg Eh4yvcZZ/xgcvKn6EqWzXfWysA+t0FB/mqkrbq7YthZ52mc8kexxGokiLBnROkCZqnLz rnPA96ibtIp+91zZd9F7Bd+I+A+iyV4e7VA42FWTY3wjwadf2yVaaKb1iedZY4vTsdy9 +rqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ReYOQaUr; 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 n11si16910289plg.248.2019.05.13.06.33.49; Mon, 13 May 2019 06:34:07 -0700 (PDT) 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=ReYOQaUr; 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 S1729335AbfEMLpM (ORCPT + 99 others); Mon, 13 May 2019 07:45:12 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:54640 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726866AbfEMLpM (ORCPT ); Mon, 13 May 2019 07:45:12 -0400 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=kIFwTuS2Cq6ZYIK7P/ywG/BfaUTgrMlQGg1qCWu+uzI=; b=ReYOQaUrt+Qr5hvD0m6+3Wv1W Nl73W6f8/GripfZ2I08SDufPtJezjJz80V+AW5QAewsXGvNgn+yjPfJQsIqQoLMKbiSLm15r+/noV 2gclMRQHZQ9K/QGx0V1p8d0Ggsy26zQT3JhiJpqJ8AE9StIfmozWUMinKQCZCbldDvcqluN3UdZab NErbyDac0Qx/Xup/S+txTRLHKF1eobwznZdDqbQCpEIEzy1uV94J3hhXPlE3ywc7wGSlkCmhcT5Q9 AnaAjUD20+tFeEiBrSdzmmQ2TpHTS05Mfg0FJ4nMCCRGDA+2USffRHMskSbr+o0thKRygfdVxCJbG yfa1+Tqhw==; 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.90_1 #2 (Red Hat Linux)) id 1hQ9OD-0006ri-VS; Mon, 13 May 2019 11:45:06 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 60BA92029F87A; Mon, 13 May 2019 13:45:04 +0200 (CEST) Date: Mon, 13 May 2019 13:45:04 +0200 From: Peter Zijlstra To: Yuyang Du Cc: will.deacon@arm.com, mingo@kernel.org, bvanassche@acm.org, ming.lei@redhat.com, frederic@kernel.org, tglx@linutronix.de, boqun.feng@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/17] locking/lockdep: Add lock type enum to explicitly specify read or write locks Message-ID: <20190513114504.GR2623@hirez.programming.kicks-ass.net> References: <20190513091203.7299-1-duyuyang@gmail.com> <20190513091203.7299-2-duyuyang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190513091203.7299-2-duyuyang@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 13, 2019 at 05:11:47PM +0800, Yuyang Du wrote: > + * Note that we have an assumption that a lock class cannot ever be both > + * read and recursive-read. We have such locks in the kernel... see: kernel/qrwlock.c:queued_read_lock_slowpath() And yes, that is somewhat unfortunate, but hard to get rid of due to hysterical raisins.