Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5324074iob; Mon, 9 May 2022 13:49:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV2eE4G5g0gxPY36wJs2/0aRAPxBWvnh+8QWrin/+JqAPOc5Y1Q7gkjJEDo3Hit3vZkyDM X-Received: by 2002:a17:906:3144:b0:6ce:de5d:5e3b with SMTP id e4-20020a170906314400b006cede5d5e3bmr16505500eje.689.1652129388693; Mon, 09 May 2022 13:49:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652129388; cv=none; d=google.com; s=arc-20160816; b=t4TBfomujh7gSUsOxc5ervjF8geESg6UWdGPi5KIfGjqIpp87oMzxDI9+p0Mki/7Rj dHVtKvcKsjJwcSVB/JnSHdr/CGNttFEvdk27uKXlfMCduH2SEk3Wrst4uhRRc++aYhWM 68nF5I8St9+mszgj4bcLGkzdtvGHbpc2neBsLbdnDylse/gkZMNNmV4WSviQCbi1GLJ5 RONflsk3mON+Bto3vRrcY3VRtzzQoh2HjLSzbY3rEaG94A1iUPckxYor5kBBdWNxPZOI SBj0y6mUXC4Sw60RaeuDHGdzlMYl8V575qLDANdlUxyziKe021R81eLTCk8H8cyGHPpg ySig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=XF4nDeZ/caRzZIeRf2WLDZ2ztJ4hYTIeyc7KctC3zwo=; b=pOy/t15yIQrL6A48dIUv+15O3iqJl0BFFdDv3d7Q4krUvhrcGgdutPfZ2HGO3Rptxt YAMpTfq6uECIb19UxhwPDaEVvfnmQM/9IQ9hYBBsoKxN9saSI2Q9fmJOZloOqleUD9z2 c0IUBq9a0tv3WpwpW9lqjjA/o5ovDti+F/euTzXXnHHoRT6pWj/CNSz+w3eWrbqvqt4/ wB5a/XQP/pbBJfSyj+0+m2RSlMdMXph6oERd4+K2RXNuWxOQeVYvZRolOOCmZuBs98ne wjm/T7H2VVjoWr9x3AKcyeJwZf1acABg/AX3STuuz7SVNss4kZo4azr5D7GhQYfeIgh5 cMvQ== 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 dn9-20020a17090794c900b006df76385d9bsi1993279ejc.571.2022.05.09.13.49.18; Mon, 09 May 2022 13:49:48 -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 S229833AbiEIUvW (ORCPT + 99 others); Mon, 9 May 2022 16:51:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbiEIUvR (ORCPT ); Mon, 9 May 2022 16:51:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2E922B1DD1; Mon, 9 May 2022 13:47:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 77FE061707; Mon, 9 May 2022 20:47:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A498C385BA; Mon, 9 May 2022 20:47:14 +0000 (UTC) Date: Mon, 9 May 2022 16:47:12 -0400 From: Steven Rostedt To: Byungchul Park Cc: Hyeonggon Yoo <42.hyeyoo@gmail.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, linux-kernel@vger.kernel.org, peterz@infradead.org, will@kernel.org, tglx@linutronix.de, joel@joelfernandes.org, sashal@kernel.org, daniel.vetter@ffwll.ch, chris@chris-wilson.co.uk, duyuyang@gmail.com, johannes.berg@intel.com, tj@kernel.org, tytso@mit.edu, willy@infradead.org, david@fromorbit.com, amir73il@gmail.com, gregkh@linuxfoundation.org, 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, jack@suse.com, jlayton@kernel.org, dan.j.williams@intel.com, hch@infradead.org, djwong@kernel.org, dri-devel@lists.freedesktop.org, airlied@linux.ie, rodrigosiqueiramelo@gmail.com, melissa.srw@gmail.com, hamohammed.sa@gmail.com Subject: Re: [PATCH RFC v6 00/21] DEPT(Dependency Tracker) Message-ID: <20220509164712.746e236b@gandalf.local.home> In-Reply-To: <20220509001637.GA6047@X58A-UD3R> References: <1651795895-8641-1-git-send-email-byungchul.park@lge.com> <20220509001637.GA6047@X58A-UD3R> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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, 9 May 2022 09:16:37 +0900 Byungchul Park wrote: > CASE 2. > > lock L with depth n > lock A > lock_nested L' with depth n + 1 > ... > unlock L' > unlock A > unlock L > > This case is allowed by Lockdep. > This case is *NOT* allowed by DEPT cuz it's a *DEADLOCK*. > > --- > > The following scenario would explain why CASE 2 is problematic. > > THREAD X THREAD Y > > lock L with depth n > lock L' with depth n > lock A > lock A > lock_nested L' with depth n + 1 I'm confused by what exactly you are saying is a deadlock above. Are you saying that lock A and L' are inversed? If so, lockdep had better detect that regardless of L. A nested lock associates the the nesting with the same type of lock. That is, in lockdep nested tells lockdep not to trigger on the L and L' but it will not ignore that A was taken. -- Steve > lock_nested L'' with depth n + 1 > ... ... > unlock L' unlock L'' > unlock A unlock A > unlock L unlock L'