Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp594653pxp; Sat, 5 Mar 2022 12:27:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKHMZxu8tde6TxioqTwLxCjzAgrMi102v+V+EkwFiFsanzWuDQHMEQCyIkZqscPwySw83L X-Received: by 2002:a17:90a:ba07:b0:1bc:a0fd:faf with SMTP id s7-20020a17090aba0700b001bca0fd0fafmr5339658pjr.194.1646512062534; Sat, 05 Mar 2022 12:27:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646512062; cv=none; d=google.com; s=arc-20160816; b=Ba7/tnRClYRwVoZUE2p8E3WfLl377q8+728HnIgdYrXnvN66I3GF2YKBIcb2lILbqQ 2jKbF/TPQYPpeEla8LeDJqYfTIPXWteLPLMYDeiuQNDDrXf+XpspXRXQEI+uBkQ1ex4M D8d4rHDx+Do/Q1HNn45bXgjvAysJjSi3Yr/r63JasLh/8r9IGsia51coyMdoxt9v/BZ0 FAt5BZtJ39qPneP0vRwjScbeYxmEvcCVdl3Lrd7mrre/W5lO57lOnJo3uZDwzEZaN6o0 52dKeWWs5lrUsL8gdATtQh5ixHOWchXbYFYA2ysnGfvP4/um2X5yDN4GN4zPq3BIZXQe ENrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=geC5xDAay5dBwn3cRxysbEgCyiuAzwcwhdO/zo7/1yQ=; b=wx1Q61pup0ckonwIoWrRCxvfS1HUv0mhBmwyKOw5AXaKsSMw6L1j4WoBnLoSO0oKy8 OIGqZseov7s3l7ewlzvPQqYUTFh2FkRVLi4dGdzy4lKZDEl7R8Raa9Vxqae1TJhITH4e j2r6m28DjujZpOInxiL8XHgojZxsehRQaw+NMCPdi6V7/fdSljCo6osy6u/LygrgNGZ9 RO2wfzWxdHidNXq9G6AuHI+HrGjF3xQy+pDhz6x6xhr8nexBdRNqonA3tpfM+L8CL7ul v6fuUx9IxRqIfpyaUgCMYLF9nf3mlY9aPyXdXJnmmi2aFpywfATbVIuIzyRpY4gCj136 hcoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=tixvP1FG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 t14-20020a17090a2f8e00b001befccfd1b3si2927944pjd.181.2022.03.05.12.27.26; Sat, 05 Mar 2022 12:27:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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; dkim=pass header.i=@joelfernandes.org header.s=google header.b=tixvP1FG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231913AbiCEPGR (ORCPT + 99 others); Sat, 5 Mar 2022 10:06:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229656AbiCEPGP (ORCPT ); Sat, 5 Mar 2022 10:06:15 -0500 Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 896821C65EE for ; Sat, 5 Mar 2022 07:05:25 -0800 (PST) Received: by mail-qt1-x82a.google.com with SMTP id o22so166549qta.8 for ; Sat, 05 Mar 2022 07:05:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=geC5xDAay5dBwn3cRxysbEgCyiuAzwcwhdO/zo7/1yQ=; b=tixvP1FGnq2wfskq9ETIT5h8JQ7JPBjYQlaZiVU5QEF2ebRlSOd9Hj4GHFYYxuldWh AEzNtAg/yji+2YKFPr0a17Al0EC/FApvTFNyo+sILOPE6zyZMSw0ZdguDzVRFqh+N+G9 axgAo/svRSLgSVS0G7iScy/imA1XKMIHb1NgI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=geC5xDAay5dBwn3cRxysbEgCyiuAzwcwhdO/zo7/1yQ=; b=4O0AMVAyyiIPmTq3f/U0TpoEBxhXyZUiHsEg5KPddADtUGYHvc0Q71+nigfu9BEtsX iLMRPYg2IUNFPBDfyiFxtCHNgcawAZkl97leYSWHJywvpcqA9lg6304bun8b+1kJ69Xd vqumsC3WKZ7apjlsEXU36Pd3ScnbcpVz+Seczl7g86JKYYwgYM2i2mqirE2EzwAMetEk ljQz4rxYfNCe5E7iTehAVK94YVdveY35lysNQI1GYw6ItWPOLYZZps9d6DKYRcuU9RAs bJscu/xIWPocXVTH8GIAR1L6YI4BIPDMsmg9h3DDZqMUlrB04M5oJdZ5UTindCslNjFN 82rg== X-Gm-Message-State: AOAM532x50oSSCTAW0TEUfrHjEtNwzMXgLuOxgFUffeJGYm1cnWbWJes g0nQtjfiSK7PU+0paGkR8ksF8g== X-Received: by 2002:a05:622a:3ca:b0:2df:1cae:397b with SMTP id k10-20020a05622a03ca00b002df1cae397bmr3200121qtx.556.1646492724622; Sat, 05 Mar 2022 07:05:24 -0800 (PST) Received: from localhost (228.221.150.34.bc.googleusercontent.com. [34.150.221.228]) by smtp.gmail.com with ESMTPSA id t128-20020a37aa86000000b0060ddf2dc3ecsm3859545qke.104.2022.03.05.07.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Mar 2022 07:05:24 -0800 (PST) Date: Sat, 5 Mar 2022 15:05:23 +0000 From: Joel Fernandes To: Byungchul Park Cc: Theodore Ts'o , damien.lemoal@opensource.wdc.com, linux-ide@vger.kernel.org, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, torvalds@linux-foundation.org, mingo@redhat.com, linux-kernel@vger.kernel.org, peterz@infradead.org, will@kernel.org, tglx@linutronix.de, rostedt@goodmis.org, sashal@kernel.org, daniel.vetter@ffwll.ch, chris@chris-wilson.co.uk, duyuyang@gmail.com, johannes.berg@intel.com, tj@kernel.org, willy@infradead.org, david@fromorbit.com, amir73il@gmail.com, bfields@fieldses.org, 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, paulmck@kernel.org Subject: Re: Report 2 in ext4 and journal based on v5.17-rc1 Message-ID: References: <1646285013-3934-1-git-send-email-byungchul.park@lge.com> <20220304004237.GB6112@X58A-UD3R> <20220305141538.GA31268@X58A-UD3R> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220305141538.GA31268@X58A-UD3R> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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-kernel@vger.kernel.org On Sat, Mar 05, 2022 at 11:15:38PM +0900, Byungchul Park wrote: > On Fri, Mar 04, 2022 at 10:26:23PM -0500, Theodore Ts'o wrote: > > On Fri, Mar 04, 2022 at 09:42:37AM +0900, Byungchul Park wrote: > > > > > > All contexts waiting for any of the events in the circular dependency > > > chain will be definitely stuck if there is a circular dependency as I > > > explained. So we need another wakeup source to break the circle. In > > > ext4 code, you might have the wakeup source for breaking the circle. > > > > > > What I agreed with is: > > > > > > The case that 1) the circular dependency is unevitable 2) there are > > > another wakeup source for breadking the circle and 3) the duration > > > in sleep is short enough, should be acceptable. > > > > > > Sounds good? > > > > These dependencies are part of every single ext4 metadata update, > > and if there were any unnecessary sleeps, this would be a major > > performance gap, and this is a very well studied part of ext4. > > > > There are some places where we sleep, sure. In some case > > start_this_handle() needs to wait for a commit to complete, and the > > commit thread might need to sleep for I/O to complete. But the moment > > the thing that we're waiting for is complete, we wake up all of the > > processes on the wait queue. But in the case where we wait for I/O > > complete, that wakeupis coming from the device driver, when it > > receives the the I/O completion interrupt from the hard drive. Is > > that considered an "external source"? Maybe DEPT doesn't recognize > > that this is certain to happen just as day follows the night? (Well, > > maybe the I/O completion interrupt might not happen if the disk drive > > bursts into flames --- but then, you've got bigger problems. :-) > > Almost all you've been blaming at Dept are totally non-sense. Based on > what you're saying, I'm conviced that you don't understand how Dept > works even 1%. You don't even try to understand it before blame. > > You don't have to understand and support it. But I can't response to you > if you keep saying silly things that way. Byungchul, other than ext4 have there been any DEPT reports that other subsystem maintainers' agree were valid usecases? Regarding false-positives, just to note lockdep is not without its share of false-positives. Just that (as you know), the signal-to-noise ratio should be high for it to be useful. I've put up with lockdep's false positives just because it occasionally saves me from catastrophe. > > In any case, if DEPT is going to report these "circular dependencies > > as bugs that MUST be fixed", it's going to be pure noise and I will > > ignore all DEPT reports, and will push back on having Lockdep replaced > > Dept is going to be improved so that what you are concerning about won't > be reported. Yeah I am looking forward to learning more about it however I was wondering about the following: lockdep can already be used for modeling "resource acquire/release" and "resource wait" semantics that are unrelated to locks, like we do in mm reclaim. I am wondering why we cannot just use those existing lockdep mechanisms for the wait/wake usecases (Assuming that we can agree that circular dependencies on related to wait/wake is a bad thing. Or perhaps there's a reason why Peter Zijlstra did not use lockdep for wait/wake dependencies (such as multiple wake sources) considering he wrote a lot of that code. Keep kicking ass brother, you're doing great. Thanks, Joel