From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B064C3DA78 for ; Tue, 17 Jan 2023 18:19:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 091436B0074; Tue, 17 Jan 2023 13:19:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 068286B0075; Tue, 17 Jan 2023 13:19:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E717F6B0078; Tue, 17 Jan 2023 13:19:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D8B616B0074 for ; Tue, 17 Jan 2023 13:19:00 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 9E8591401E6 for ; Tue, 17 Jan 2023 18:19:00 +0000 (UTC) X-FDA: 80365102440.23.8CCA950 Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) by imf18.hostedemail.com (Postfix) with ESMTP id CBF031C0018 for ; Tue, 17 Jan 2023 18:18:56 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=QOQZ9L6N; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf18.hostedemail.com: domain of boqun.feng@gmail.com designates 209.85.160.177 as permitted sender) smtp.mailfrom=boqun.feng@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673979536; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=b2US1+cWQFyCqkm5gKb2Imr+dyizxQQ6oWxz42m5c2U=; b=s+cxIaMch1vm7cRXZ0jf9KnfcMOZ2oBRdSA6HkAYYuX68LlPeUL1uJ59wUC7rtB4eTxZyq 0BjMUXdDYuzitFXvA0Lthsi8LcKWwi7NZM5VLqlVDS7PsLGZblQnXeKVChf07xb3hBDv4o BDimpVe6UTwIowhx8TSKfujITsXN4kM= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=QOQZ9L6N; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf18.hostedemail.com: domain of boqun.feng@gmail.com designates 209.85.160.177 as permitted sender) smtp.mailfrom=boqun.feng@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673979536; a=rsa-sha256; cv=none; b=hIifTZpjWu0/DPFNX5s8INGw1LjR0pGn9ZPmxYiSDArCgl7BuZPYtH++a8V1Pod8o9AoNA mVswPJnrB9O5AqCnvy5bklF+65IBbhIhQ/g7wtEUoZWHJoWODGjWp9pTeEuAB+889XOb3Z lxvKH2VjVaoXwgv0BQ4DwqpQokFY+jE= Received: by mail-qt1-f177.google.com with SMTP id o5so6903231qtr.11 for ; Tue, 17 Jan 2023 10:18:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=b2US1+cWQFyCqkm5gKb2Imr+dyizxQQ6oWxz42m5c2U=; b=QOQZ9L6N6v89yP61QhODEIyBSxsPTBrfKXtHZgwBntOCl5ljk7i4UY0j9I1YrcUxWc ub2W9V1gWuQMcIwfl0IJJbHn1UFH1WToeORRalBsyw1US3hfGRcdzofEgLfuW92aVI+5 PwhM+jtdgnlG4zrB2uHd/qblDBP59zJAwi1i4Amb8XssPk7p0eUTutXWGl/G6u2TjIo6 baTo1PEGYQNLRS/k3y5NFaea9lAc9EJOtVg22tc04ALD7s2fItXi5fUFMvdqQRPYj4gL jrseFJqAAtFnNlDPqUevWkUie1GRsm1SONzlKxD3LY+STVP5fKzHr11q1El/ogronKmz +G/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b2US1+cWQFyCqkm5gKb2Imr+dyizxQQ6oWxz42m5c2U=; b=m3HE/HQNIARKDK1IxKzZSjqvdw+8d5krH237El7lmNI3RWJZzKtxlXN9Gy0Eeg+62P EQ2tM+iwVgRDNA6FqAbRyG6bfWjfmOlRYk+P733wbDAI22QWvII4eKt40AD6xtD4qVp1 pUBSMXDuT+RwxUP7vIl2XWkvlhCgWW3x9NGQJjbdyDIWjkjBm+2MVA37HzcY2Oq5uMG6 sZknylJxgatE5jeO4YmqPTzrj/9DztadLSJnvvGUdjzw5ZZPpHMSdOz216VnEi+hzgjj J89eICwtUlFjfPLytMtVovTiWG57whW55ZTbls1u9STrbeEgwBfhGWcXsVa6vTuRfAij +fxg== X-Gm-Message-State: AFqh2kqdgy2MkTYAfsF033c4QVdcerjNg5Dz+0NelADLoV33D2kQobzx vneuRPdkeK2/lC8uGSdC4XU= X-Google-Smtp-Source: AMrXdXsbsnjKF/gGVBYuTPp5lByzyJYc2fCAK1Am20LQmYXUk2wnvgak1qKs0D/zx4CEZtgFs/udAg== X-Received: by 2002:a05:622a:6094:b0:3a5:fd39:ff90 with SMTP id hf20-20020a05622a609400b003a5fd39ff90mr40484278qtb.3.1673979535972; Tue, 17 Jan 2023 10:18:55 -0800 (PST) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id bs25-20020ac86f19000000b0035d432f5ba3sm2425347qtb.17.2023.01.17.10.18.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 10:18:55 -0800 (PST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 175C227C0054; Tue, 17 Jan 2023 13:18:53 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 17 Jan 2023 13:18:54 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddtiedgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeeuohhq uhhnucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrf grthhtvghrnhephfetvdfgtdeukedvkeeiteeiteejieehvdetheduudejvdektdekfeeg vddvhedtnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsohhquhhnodhmvghsmhhtphgruhht hhhpvghrshhonhgrlhhithihqdeiledvgeehtdeigedqudejjeekheehhedvqdgsohhquh hnrdhfvghngheppehgmhgrihhlrdgtohhmsehfihigmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 17 Jan 2023 13:18:51 -0500 (EST) Date: Tue, 17 Jan 2023 10:18:33 -0800 From: Boqun Feng To: Linus Torvalds Cc: Byungchul Park , linux-kernel@vger.kernel.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, 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, 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, Waiman Long Subject: Re: [PATCH RFC v7 00/23] DEPT(Dependency Tracker) Message-ID: References: <1673235231-30302-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: X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: CBF031C0018 X-Stat-Signature: 8nnjsgug77ue816hq8geiyd1xbfi35de X-HE-Tag: 1673979536-984600 X-HE-Meta: U2FsdGVkX18Bjb4zSL1wIBuWGSSXBF8i9I8iKH32b/siEQgaDuHtOwxEfLNPDRr6P2Hlb3naTPHa46GVcZOOR4sWQ9XUGaIJRsxhLwPx8GqormkX6J7jWPYUqRxXWd2DTbXnYP9v5IUEJUn+8zycFxi/L+Gx+/HL+Lg8RPnlLU/85fhVhGaZvssEqk5vkABWWxTnIq3mo0A6cP6GEk2a7vgV76/4fnC9qybTuYMeufnyDgzcj23fb1TofayG58PHtTJN9t9doG1o2TRktjdlPkydDF+EKNS042ZZ4ca7G1SRURyTCVA6F+zabvJdVhp/HDRjSxpPUAJ6de/gIK+A3B0sCiCWeD1Qfu/tLCuH2dBYfWd1OLQ63hkcswGDLNN5VtcYafS/KaTZPAfvdSRiX9Bpo1Sn6NS5wOj9ViP0cCn6HOXU5OPdhXjJh/ThyucP50fnzBzzfz12d4L4lk5cTttF0SJgRwhJuuknxGnw/z1gvX3KfTL3D778JujG/daHqdlfy5HFPVTThUqWr6T4AFszAivby7PVyI7qasTouNz+CIXMH+FfV9mbKzmg5YVad+bJlD3087elULE5J/ZuDiRYXbYg1DzzOy43FJ8qHRhRACKN+DllCB6Be1Bc4zDCUhgl8Wi/QOrXmKqsiBPBXLmddQTPSy/hCkaVywJwqsQzDO3ggkRXmT41un9MMf6RuoNsQTa8hFS7b5ZMfP93MJ2iOF+MSIlq+76tbsaoVAqiminpISGBrtInjppYCV7YQbIddM+Dwuc/tPZyTXs+fHz9SehWkp+nfJg8ICdK9PIDH1Ct7BYXPsnTCRw5YwuO8w2K385G70baFqNGDBw4xHhekArxRE21r/1xzhhwc6xd/Kobitk9LFBL3sIqiYtcXH8BiPFigR44x8WZlpj7RARF4vfbdsw9xwRZPRVHg8iKFlqePjKvZJ3LXYqSRgSEz6P2DDqH0BbZjVwLeX0 X/Gj78Vi dkxkJrLq28/nanqwlXEPPSijOn67K56bIdiUw62N0Y3rkHo0yW4oP6LKC1me0q7ur2pZpBnhqUOf1Go3R5z3+hUkU+2Qsfl8lt2nx5fcCVKfqVO5Dijql6TLlVK43heQ4MWhS6mPM2ZH8Xz5vUzydRGJtpRTIFPc0ZbbsolQzvFOVvnkt9Rwcx9aaZvDWVxNHwAUG X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: [Cc Waiman] On Mon, Jan 16, 2023 at 10:00:52AM -0800, Linus Torvalds wrote: > [ Back from travel, so trying to make sense of this series.. ] > > On Sun, Jan 8, 2023 at 7:33 PM Byungchul Park wrote: > > > > 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. > > Ugh. I hate how this adds random patterns like > > if (timeout == MAX_SCHEDULE_TIMEOUT) > sdt_might_sleep_strong(NULL); > else > sdt_might_sleep_strong_timeout(NULL); > ... > sdt_might_sleep_finish(); > > to various places, it seems so very odd and unmaintainable. > > I also recall this giving a fair amount of false positives, are they all fixed? > >From the following part in the cover letter, I guess the answer is no? ... 6. Multiple reports are allowed. 7. Deduplication control on multiple reports. 8. Withstand false positives thanks to 6. ... seems to me that the logic is since DEPT allows multiple reports so that false positives are fitlerable by users? > Anyway, I'd really like the lockdep people to comment and be involved. I never get Cced, so I'm unware of this for a long time... A few comments after a quick look: * Looks like the DEPT dependency graph doesn't handle the fair/unfair readers as lockdep current does. Which bring the next question. * Can DEPT pass all the selftests of lockdep in lib/locking-selftests.c? * Instead of introducing a brand new detector/dependency tracker, could we first improve the lockdep's dependency tracker? I think Byungchul also agrees that DEPT and lockdep should share the same dependency tracker and the benefit of improving the existing one is that we can always use the self test to catch any regression. Thoughts? Actually the above sugguest is just to revert revert cross-release without exposing any annotation, which I think is more practical to review and test. I'd sugguest we 1) first improve the lockdep dependency tracker with wait/event in mind and then 2) introduce wait related annotation so that users can use, and then 3) look for practical ways to resolve false positives/multi reports with the help of users, if all goes well, 4) make it all operation annotated. Thoughts? Regards, Boqun > We did have a fairly recent case of "lockdep doesn't track page lock > dependencies because it fundamentally cannot" issue, so DEPT might fix > those kinds of missing dependency analysis. See > > https://lore.kernel.org/lkml/00000000000060d41f05f139aa44@google.com/ > > for some context to that one, but at teh same time I would *really* > want the lockdep people more involved and acking this work. > > Maybe I missed the email where you reported on things DEPT has found > (and on the lack of false positives)? > > Linus >