Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1233997pxu; Mon, 23 Nov 2020 15:29:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyiF9NC3jW5O32OPOkLLu3c8HMis7IPVIdVMS7Xmb9ASn2bnXPMvAzRTw2RQnSOU6oIlXk+ X-Received: by 2002:a17:906:1918:: with SMTP id a24mr1791747eje.432.1606174140138; Mon, 23 Nov 2020 15:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606174140; cv=none; d=google.com; s=arc-20160816; b=cJLqn7sf3G02z7UzTl0BzAG3VCdKF9MUeJc/6dLvu2ybcxYf5xa8peEPnHVoxMAwJl YLyen8mGwxvo9QlpHUZBh+iW4a5837ebp/GZt3NcfuRXeyfcoeVtdfZpryvQfzFexaLv DbKZ8WRH4UPFZmaPbXyN7xVu077pIFAsyJeexR3FzmtVGXG0WFivPFbhM+G5grHM9bJI SFQiepjDv0C8mXDvxcptY0eSK3rlHNQfHP7DyO1SC6VXziiIJagyNm7lDrOamr81mMdV ZpNxM1sdNxfvm1EwoBmaL3UM6TTIZSpJk9M8yXQJ3fjUBD1JDuS0D2rCfSq1W5n2ub9f 49Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=W4WYc0pLtl8cBt8uF0m3pq13XUjHjmTZ5SrqSMZUPhY=; b=freH9ep2Jz6Bng4P731KobL0dPTy4DJt+Tlxe91CXMSL8z78zu4WpJcRPuMNEvmkV6 O6/Sj35hxCXvPVHj0I8mPnlQfbf1bf80N8mOvjiqa00UR4l6n2v+tdHO7JyXs1QkmRX/ cmDP4MM9OreVWVj4tQdbSZQWoJ9bY2BNVb/2/A34+Fo3pkoN7SRqzoLwykvoDAGsYU4n SXXCXO5sDIQMuPlOhkdf88deK1KY81a+0wMo2gCeOzqLfBoW20XvSC4fGgLmHcRw3byA 4vSEsdcKEjfvBq+HJ/JnQHQKYEgyYEJ2daQ+2KkYHeEnY86y14vPDhTPsWOklbbgeWLP Vg0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m30si7320963edj.103.2020.11.23.15.28.36; Mon, 23 Nov 2020 15:29:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728777AbgKWKrO (ORCPT + 99 others); Mon, 23 Nov 2020 05:47:14 -0500 Received: from lgeamrelo11.lge.com ([156.147.23.51]:38473 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728523AbgKWKrO (ORCPT ); Mon, 23 Nov 2020 05:47:14 -0500 Received: from unknown (HELO lgeamrelo02.lge.com) (156.147.1.126) by 156.147.23.51 with ESMTP; 23 Nov 2020 19:47:12 +0900 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: byungchul.park@lge.com Received: from unknown (HELO X58A-UD3R) (10.177.222.33) by 156.147.1.126 with ESMTP; 23 Nov 2020 19:47:12 +0900 X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Mon, 23 Nov 2020 19:45:38 +0900 From: Byungchul Park To: Byungchul Park Cc: Steven Rostedt , Thomas Gleixner , Ingo Molnar , Linus Torvalds , Peter Zijlstra , mingo@redhat.com, will@kernel.org, LKML , Joel Fernandes , alexander.levin@microsoft.com, Daniel Vetter , Chris Wilson , duyuyang@gmail.com, johannes.berg@intel.com, Tejun Heo , Theodore Ts'o , willy@infradead.org, david@fromorbit.com, Amir Goldstein , bfields@fieldses.org, gregkh@linuxfoundation.org, kernel-team Subject: Re: [RFC] Are you good with Lockdep? Message-ID: <20201123104538.GA9464@X58A-UD3R> References: <20201111050559.GA24438@X58A-UD3R> <20201111105441.GA78848@gmail.com> <20201111093609.1bd2b637@gandalf.local.home> <87d00jo55p.fsf@nanos.tec.linutronix.de> <20201112081030.GB14554@X58A-UD3R> <20201112092612.00a19239@gandalf.local.home> <20201116090547.GC26078@X58A-UD3R> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201116090547.GC26078@X58A-UD3R> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 16, 2020 at 06:05:47PM +0900, Byungchul Park wrote: > On Thu, Nov 12, 2020 at 11:58:44PM +0900, Byungchul Park wrote: > > > > FYI, roughly Lockdep is doing: > > > > > > > > 1. Dependency check > > > > 2. Lock usage correctness check (including RCU) > > > > 3. IRQ related usage correctness check with IRQFLAGS > > > > > > > > 2 and 3 should be there forever which is subtle and have gotten matured. > > > > But 1 is not. I've been talking about 1. But again, it's not about > > > > replacing it right away but having both for a while. I'm gonna try my > > > > best to make it better. > > > > > > And I believe lockdep does handle 1. Perhaps show some tangible use case > > > that you want to cover that you do not believe that lockdep can handle. If > > > lockdep cannot handle it, it will show us where lockdep is lacking. If it > > > can handle it, it will educate you on other ways that lockdep can be > > > helpful in your development ;-) > > 1) OK. Lockdep might work with trylock well. > 2) Definitely Lockdep cannot do what Cross-release was doing. > 3) For readlock handling, let me be back later and give you examples. I > need check current Lockdep code first. But I have to all-stop what > I'm doing at the moment because of a very big personal issue, which > is a sad thing. I just found that Boqun Feng has made a lot of changes into Lockdep recently to support tracking recursive read locks, while I was checking how the current Lockdep deals with read locks. I need to read the code more.. I'll add my opinion on it once I see how it works. Before that, I'd like to share my approach so that you guys can see what means to track *wait* and *event*, how simply the tool can work and what exactly a deadlock detection tool should do. Let me add my patches onto this thread right away. I understand you all don't want to replace such a stable tool but I hope you to see *the* right way to track things for that purpose. Again, I do never touch any other functions of Lockdep including all great efforts that have been made but dependency tracking. Thanks, Byungchul