Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16914636rwd; Mon, 26 Jun 2023 17:33:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7M3zh1Z1bC4gJgf3m6Lrm34zp0PY9NWPVY/V4MH4uUg2WJKebA9uN8L9gVXnx0UP+g2Re9 X-Received: by 2002:a05:6870:5243:b0:1ad:565f:df6c with SMTP id o3-20020a056870524300b001ad565fdf6cmr10574551oai.46.1687825993314; Mon, 26 Jun 2023 17:33:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687825993; cv=none; d=google.com; s=arc-20160816; b=O0XphPVezPrbXgBdmW32x19/6JLg2LxAS27S+rg+ZNFOk6EhmC6kr60lxBCXt8V7bs Jr+PSijCoKzLpsBbiArLsgrEAze6Zd0oNozTQaW9dDShJpld+fNrmNo2aiuAmZV49F7O h9G5HBfwKcuDCUkt3Wpcl8nloK6VtzlOdN6ce4QRPh7qHMEcblgWrDaztT8LwqKH7mL9 clwUsMHmGw0JciJdlwINJQFalsihoGko+G9EliCADozPm9+tqZDn3tOuEnoT5mxYI/P2 8gEQLCI+p+VcwzDdAG+FPfxNuOCTFgPUaZVubqneE03DrOwGxZ5GQylWeWu/HfcSnkLT gmuQ== 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=bmmQN2mBVeeQOPCDa6CtVHryvh/55Ury6aFp2t5e53I=; fh=F+2bULTxe/Zeetal5NYNN8QxTDgBEyd6aXCmAmDWpBk=; b=dQETj2+m1uomhpl0UMxkIxyfiNc2B/M0SOTqqW36/aEsvFBRTlVoDyPOY3OJoJEqwg TvqSVuWWoHSNpk1RIHbby3hPCR0mJYbgMn9HPvDC4NjKkIvzFJQ5WAuIN8YSGG9zdBhi CthCF8ZA5CTa+CVYoBkn29i5RmohZ7TW4mWA1avXJsfFXxaWjt3bdYqhbBeEOIa3Hwrt uacdSOBB0ANLUKIv4Ow6sUO+XAwXkzORx14lg1gQbV96rhZr8s7t86Ca4VfwmKjtlF94 /ylydggCKRVjNWyQkmnADxSGK9epUAxj/gMJGq3PPX0voFKIWn6Xbryo9PhiKMzt8+Wy ITzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t191-20020a6381c8000000b0054ffea27c23si5879467pgd.285.2023.06.26.17.32.57; Mon, 26 Jun 2023 17:33:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229463AbjF0A3D (ORCPT + 99 others); Mon, 26 Jun 2023 20:29:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjF0A3C (ORCPT ); Mon, 26 Jun 2023 20:29:02 -0400 Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6F7F81704; Mon, 26 Jun 2023 17:28:58 -0700 (PDT) X-AuditID: a67dfc5b-d85ff70000001748-51-649a2d4740c7 Date: Tue, 27 Jun 2023 09:27:20 +0900 From: Byungchul Park To: Greg KH Cc: linux-kernel@vger.kernel.org, kernel_team@skhynix.com, torvalds@linux-foundation.org, damien.lemoal@opensource.wdc.com, linux-ide@vger.kernel.org, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, will@kernel.org, tglx@linutronix.de, rostedt@goodmis.org, joel@joelfernandes.org, sashal@kernel.org, daniel.vetter@ffwll.ch, duyuyang@gmail.com, johannes.berg@intel.com, tj@kernel.org, tytso@mit.edu, willy@infradead.org, david@fromorbit.com, amir73il@gmail.com, kernel-team@lge.com, linux-mm@kvack.org, akpm@linux-foundation.org, mhocko@kernel.org, minchan@kernel.org, hannes@cmpxchg.org, vdavydov.dev@gmail.com, sj@kernel.org, jglisse@redhat.com, dennis@kernel.org, cl@linux.com, penberg@kernel.org, rientjes@google.com, vbabka@suse.cz, ngupta@vflare.org, linux-block@vger.kernel.org, paolo.valente@linaro.org, josef@toxicpanda.com, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, jack@suse.cz, jlayton@kernel.org, dan.j.williams@intel.com, hch@infradead.org, djwong@kernel.org, dri-devel@lists.freedesktop.org, rodrigosiqueiramelo@gmail.com, melissa.srw@gmail.com, hamohammed.sa@gmail.com, 42.hyeyoo@gmail.com, chris.p.wilson@intel.com, gwan-gyeong.mun@intel.com, max.byungchul.park@gmail.com, boqun.feng@gmail.com, longman@redhat.com, hdanton@sina.com, her0gyugyu@gmail.com Subject: Re: [PATCH v10 00/25] DEPT(Dependency Tracker) Message-ID: <20230627002720.GA55700@system.software.com> References: <20230626115700.13873-1-byungchul@sk.com> <2023062627-chooser-douche-6613@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2023062627-chooser-douche-6613@gregkh> User-Agent: Mutt/1.9.4 (2018-02-28) X-Brightmail-Tracker: H4sIAAAAAAAAA02Sb0xTZxTG87739r23jV3uqrJX2L50MVswKC4sHANxW7Jk98PMliybyUh0 zXqVZi2SQossMaJUwx8lwAIdhWwFTCFYBYvzb0v4E8CrGbLBWNcAUaab1SKm2tpahrYQM7+c /PI8T55zPhye0dhIOm8oKpXMRTqjlqhY1eK69i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egMAAA== X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Jun 26, 2023 at 03:02:22PM +0200, Greg KH wrote: > On Mon, Jun 26, 2023 at 08:56:35PM +0900, Byungchul Park wrote: > > >From now on, I can work on LKML again! I'm wondering if DEPT has been > > helping kernel debugging well even though it's a form of patches yet. > > > > I'm happy to see that DEPT reports a real problem in practice. See: > > > > https://lore.kernel.org/lkml/6383cde5-cf4b-facf-6e07-1378a485657d@I-love.SAKURA.ne.jp/#t > > https://lore.kernel.org/lkml/1674268856-31807-1-git-send-email-byungchul.park@lge.com/ > > > > Nevertheless, I apologize for the lack of document. I promise to add it > > before it gets needed to use DEPT's APIs by users. For now, you can use > > DEPT just with CONFIG_DEPT on. > > > > --- > > > > 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. It's done on v6.2-rc2. > > > > Benifit: > > > > 0. Works with all lock primitives. > > 1. Works with wait_for_completion()/complete(). > > 2. Works with 'wait' on PG_locked. > > 3. Works with 'wait' on PG_writeback. > > 4. Works with swait/wakeup. > > 5. Works with waitqueue. > > 6. Works with wait_bit. > > 7. Multiple reports are allowed. > > 8. Deduplication control on multiple reports. > > 9. Withstand false positives thanks to 6. > > 10. Easy to tag any wait/event. > > > > Future work: > > > > 0. To make it more stable. > > 1. To separates Dept from Lockdep. > > 2. To improves performance in terms of time and space. > > 3. To use Dept as a dependency engine for Lockdep. > > 4. To add any missing tags of wait/event in the kernel. > > 5. To deduplicate stack trace. > > If you run this today, does it find any issues with any subsystems / > drivers that the current lockdep code does not find? Have you run your Yes, it found some deadlocks. The following issue was about a deadlock by PG_locked detected by DEPT which lockdep couldn't. Check it out: https://lore.kernel.org/lkml/6383cde5-cf4b-facf-6e07-1378a485657d@I-love.SAKURA.ne.jp/#t https://lore.kernel.org/lkml/1674268856-31807-1-git-send-email-byungchul.park@lge.com/ > tool on patches sent to the different mailing lists for new drivers and > code added to the tree to verify that it can find issues easily? I had been co-working with GPU driver developers for their new drivers adding to their CI system to verify that it can find issues easily. Now that I've almost organized my stuff, I will re-start it. > In other words, why do we need this at all? What makes it 'better' than > what we already have that works for us today? What benifit is it? AS IS : It can detect deadlocks by wrong lock usage e.g. acqusition order. Once it reports a issue, you must resolve it or work around to see further reports even if it's not one you are into. TO BE : It can detect deadlocks by not only locks but also any waits e.g. wait_for_completion(), PG_locked, PG_writeback, dma fence and so on. Last but not least, DEPT can report issues multiple times at a single system-up so that any issues that you are not into, no longer prevent further reports that is valuable to you. However, yes. DEPT needs to be more matured. I'd like to do that together. Byungchul > thanks, > > greg k-h