Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp319532yba; Fri, 26 Apr 2019 00:07:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqyiRWVu3hXo3z9xCfWS9N2zjeAnChItAw8vkvnFv3fGtfqGbExMLluUaBdn5d5tfSZihHx8 X-Received: by 2002:a62:5185:: with SMTP id f127mr45492693pfb.199.1556262477148; Fri, 26 Apr 2019 00:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556262477; cv=none; d=google.com; s=arc-20160816; b=FFsQpDYVdSmrutxFRQH3kv4LuHeFf2jbadcNSppnfstZkjFzuC6fEl82ZhxY113pS5 7Zp7cTEb/hHV48yVvQQOArSRpJL0MEnlOCNSfTZzdjbqd2q7Cb3AjInMZWGWHczPe2HA hQlMuQRzpOSDUSnLfSxR4QnKZ7XudSVgBtUEQIDwql4bQlc2uzUENVtVr0VwxKIiB2YG dvGqnKzIFKHnTNyV58QDoobe6V3zncszEQ3NSlNgZcHlsod/vZqGopytE0X7WUSWt2P/ Om2bEIaRvU/Y4702XD/Hi5AEWKMFSVBgEexLKN0VvfdzQ1Xv9oUK8IFSOn8cq4OtUmZn yVfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=m6HcQ1+0pWmKCOtOZFrgkZfRLyjP4/xTC1PdjicHU30=; b=YXyEtZ1jy+OoYAYUv3OgIgEKmt7mXAr5ymHyRBF4ACEoFDZ1d5GUFWa8AuV96gJae8 7iJfdPTzyB0DTN0dbGcJzvl9MoVHKeUAxcbyE6bx2+NfgLIvQiNE+LXSuoaLNyuZPR16 2EBBkittVbwZ8ody8OZJsXoNsqdjJI87FmYry7KZSG8pKi4DjYtqgCU3WyPG6er3ww1m 0+Pgi12QwFjdUDU0NAbTjRFmJsasKJ7uCleuoLYjkeC/sA/yi5cKGUe8jyoEnc8Il6yU V4G47HrSqOI+8DoiMgsJIYwFVw6Zvm2DPCxb2iiwNAItmerCZ2c+M8MRbEb8GYF2jszm ymYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="W2/Cj2E4"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ch12si5175220plb.5.2019.04.26.00.07.40; Fri, 26 Apr 2019 00:07:57 -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=pass header.i=@gmail.com header.s=20161025 header.b="W2/Cj2E4"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725951AbfDZHGt (ORCPT + 99 others); Fri, 26 Apr 2019 03:06:49 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:40072 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725877AbfDZHGt (ORCPT ); Fri, 26 Apr 2019 03:06:49 -0400 Received: by mail-qt1-f196.google.com with SMTP id y49so165614qta.7 for ; Fri, 26 Apr 2019 00:06:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m6HcQ1+0pWmKCOtOZFrgkZfRLyjP4/xTC1PdjicHU30=; b=W2/Cj2E4FG6X1qKpZC6N2S+XAES13IBz9g+XnSDZYMjSw49jj/+v0BQw6tfX3qMsCW s9gtLCxWwzWUHQ0mJYEqwREy+u3BxzLbfcfysnD5fcCKvcW2ZQjz6hrNWmUlSG4r+owZ hQQJe0pcANzkDnuduZtUsbmnsq0XIIjfTplgKrv9eBG9xVrx6vBb8bn8HJgTd7jGe3wO W0hh2srfXo9WMgxPRHKIO8JSENm6xAu4WBpnSiXm+ApgZ2zF7Wu9bVGiBDTMkKilTEg+ Ro5tEyyXAxmgtwHO5UgKBiifSjMlpdRBMtI/WYuac9HS6W4H0XxxRWp2DfL2WdQmLXO7 a94Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=m6HcQ1+0pWmKCOtOZFrgkZfRLyjP4/xTC1PdjicHU30=; b=cLrhA08bVUlAZsNpfz9WWEUMH+ypOtiyY9rT3VJxfYe6jExba9aB1/CRbIFoULTtq0 0lQlgp2NQm+aiLffrPmTQ+W4au/uwumWgtX3OHGMGBDAFTAGgWS8CkVVeW9lBvr5/nP9 dNcdqpr7HhF9I8vCbuThebhPAwMv32X1eu8rITljmhUFEwa77rjYPpAgtVpbP6ZXs6M/ WY350akZGP3GvlEeo0CJmjlXbvxXkSVAwQMYxp7WMvhLzb32hatb/T9R8hjHGo/Zd0bN qaMwZmnixr9Xm2j/oFCbXwFoROVakHZcApAx2J25PWlwF+ayZ52TlBz44LP50yr0t4RX e/gQ== X-Gm-Message-State: APjAAAXVQaWYfb5HQd5JMvy3gLZ2oSXtAAi3rt0CgDaySyZos+ot2VVH kf53PC2JaUZIPyyyKdYf4Y+9+YWXia0QnQkfcKg= X-Received: by 2002:ac8:2843:: with SMTP id 3mr34486583qtr.327.1556262408677; Fri, 26 Apr 2019 00:06:48 -0700 (PDT) MIME-Version: 1.0 References: <20190424101934.51535-1-duyuyang@gmail.com> <20190424101934.51535-25-duyuyang@gmail.com> <20190425200336.GY12232@hirez.programming.kicks-ass.net> In-Reply-To: <20190425200336.GY12232@hirez.programming.kicks-ass.net> From: Yuyang Du Date: Fri, 26 Apr 2019 15:06:34 +0800 Message-ID: Subject: Re: [PATCH 24/28] locking/lockdep: Remove !dir in lock irq usage check To: Peter Zijlstra Cc: will.deacon@arm.com, Ingo Molnar , Bart Van Assche , ming.lei@redhat.com, Frederic Weisbecker , tglx@linutronix.de, LKML , Boqun Feng Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for review. On Fri, 26 Apr 2019 at 04:03, Peter Zijlstra wrote: > > On Wed, Apr 24, 2019 at 06:19:30PM +0800, Yuyang Du wrote: > > In mark_lock_irq(), the following checks are performed: > > > > ---------------------------------- > > | -> | unsafe | read unsafe | > > |----------------------------------| > > | safe | F B | F* B* | > > |----------------------------------| > > | read safe | F? B* | - | > > ---------------------------------- > > > > Where: > > F: check_usage_forwards > > B: check_usage_backwards > > *: check enabled by STRICT_READ_CHECKS > > ?: check enabled by the !dir condition > > > > From checking point of view, the special F? case does not make sense, > > whereas it perhaps is made for peroformance concern. As later patch will > > address this issue, remove this exception, which makes the checks > > consistent later. > > > > With STRICT_READ_CHECKS = 1 which is default, there is no functional > > change. > > Oh man.. thinking required and it is way late.. anyway this whole read > stuff made me remember we had a patch set on readlocks last year. > > https://lkml.kernel.org/r/20180411135110.9217-1-boqun.feng@gmail.com > > I remember reviewing that a few times and then it dropped on the floor, > probably because Spectre crap or something sucked up all my time again :/ > > Sorry Boqun! Oh man, I thought about the read-write lock stuff, but I didn't know Boqun's patch. Let me hurt my brain looking at that patch.