Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4E67DC433F5 for ; Mon, 9 May 2022 01:23:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 734A110EBA3; Mon, 9 May 2022 01:23:41 +0000 (UTC) Received: from lgeamrelo11.lge.com (lgeamrelo12.lge.com [156.147.23.52]) by gabe.freedesktop.org (Postfix) with ESMTP id E8EF810EBA3 for ; Mon, 9 May 2022 01:23:39 +0000 (UTC) Received: from unknown (HELO lgeamrelo04.lge.com) (156.147.1.127) by 156.147.23.52 with ESMTP; 9 May 2022 10:23:37 +0900 X-Original-SENDERIP: 156.147.1.127 X-Original-MAILFROM: byungchul.park@lge.com Received: from unknown (HELO X58A-UD3R) (10.177.244.38) by 156.147.1.127 with ESMTP; 9 May 2022 10:23:37 +0900 X-Original-SENDERIP: 10.177.244.38 X-Original-MAILFROM: byungchul.park@lge.com Date: Mon, 9 May 2022 10:22:02 +0900 From: Byungchul Park To: Linus Torvalds Subject: Re: [PATCH RFC v6 00/21] DEPT(Dependency Tracker) Message-ID: <20220509012202.GB6047@X58A-UD3R> References: <1651652269-15342-1-git-send-email-byungchul.park@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hamohammed.sa@gmail.com, Jan Kara , Peter Zijlstra , Daniel Vetter , Amir Goldstein , Dave Chinner , dri-devel , Chris Wilson , "J. Bruce Fields" , linux-ide@vger.kernel.org, Andreas Dilger , Joel Fernandes , 42.hyeyoo@gmail.com, Christoph Lameter , Will Deacon , duyuyang@gmail.com, Sasha Levin , paolo.valente@linaro.org, Damien Le Moal , Matthew Wilcox , Christoph Hellwig , Dave Airlie , Ingo Molnar , "Darrick J. Wong" , Vladimir Davydov , David Rientjes , Dennis Zhou , Ext4 Developers List , Linux-MM , ngupta@vflare.org, johannes.berg@intel.com, jack@suse.com, Dan Williams , Josef Bacik , Steven Rostedt , linux-block , linux-fsdevel , Jerome Glisse , Al Viro , Thomas Gleixner , Michal Hocko , Vlastimil Babka , melissa.srw@gmail.com, sj@kernel.org, Theodore Ts'o , rodrigosiqueiramelo@gmail.com, kernel-team@lge.com, Greg Kroah-Hartman , Jeff Layton , Linux Kernel Mailing List , Pekka Enberg , Minchan Kim , Johannes Weiner , Tejun Heo , Andrew Morton Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, May 04, 2022 at 11:17:02AM -0700, Linus Torvalds wrote: > On Wed, May 4, 2022 at 1:19 AM Byungchul Park wrote: > > > > Hi Linus and folks, > > > > I've been developing a tool for detecting deadlock possibilities by > > tracking wait/event rather than lock(?) acquisition order to try to > > cover all synchonization machanisms. > > So what is the actual status of reports these days? I'd like to mention one important thing here. Reportability would get stronger if the more wait-event pairs get tagged everywhere DEPT can work. Everything e.g. HW-SW interface, any retry logic and so on can be a wait-event pair if they work wait or event anyway. For example, polling on an IO mapped read register and initiating the HW to go for the event also can be a pair. Definitely those make DEPT more useful. --- The way to use the APIs: 1. Define SDT(Simple Dependency Tracker) DEFINE_DEPT_SDT(my_hw_event); <- add this 2. Tag on the waits sdt_wait(&my_hw_event); <- add this ... retry logic until my hw work done ... <- the original code 3. Tag on the events sdt_event(&my_hw_event); <- add this run_my_hw(); <- the original code --- These are all we should do. I believe DEPT would be a very useful tool once all wait-event pairs get tagged by the developers in all subsystems and device drivers. Byungchul > Last time I looked at some reports, it gave a lot of false positives > due to mis-understanding prepare_to_sleep(). > > For this all to make sense, it would need to not have false positives > (or at least a very small number of them together with a way to sanely > get rid of them), and also have a track record of finding things that > lockdep doesn't. > > Maybe such reports have been sent out with the current situation, and > I haven't seen them. > > Linus