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 26E63C54E76 for ; Tue, 17 Jan 2023 18:41:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9814D6B0074; Tue, 17 Jan 2023 13:41:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 930DA6B0075; Tue, 17 Jan 2023 13:41:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D1686B0078; Tue, 17 Jan 2023 13:41:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 68D866B0074 for ; Tue, 17 Jan 2023 13:41:02 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 34EDC1A0AEB for ; Tue, 17 Jan 2023 18:41:02 +0000 (UTC) X-FDA: 80365157964.28.B44DC8E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf26.hostedemail.com (Postfix) with ESMTP id 46BC514000A for ; Tue, 17 Jan 2023 18:41:00 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=CPh7ECQX; spf=pass (imf26.hostedemail.com: domain of longman@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=longman@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673980860; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=iFiAegt8WNgL5MZXxVPS9mQqy9Ss59WQtK/8IB6U8eA=; b=6ZeXU7V5YISUKGkerEpUO2vkQ31s4NvNYBE5UenTyPfQhJvnW+6Gc6dIfkNmD//Irzxeg4 Q3b4DPXzjutCtQqy+uLcc4IJpnYJs09C/0YhFYEwf15sthEaE706I9dqGYtPGo29qib0dm dqbgXvT1vU633lWXwRXd2/eG8u+152U= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=CPh7ECQX; spf=pass (imf26.hostedemail.com: domain of longman@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=longman@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673980860; a=rsa-sha256; cv=none; b=747yGRvBipdnewM/SW8MwtmO1ByFksk2CffwBRB75SXkrTS/7maoDPEQfqjXG68FyaH4Mb 5b4cIFowkBYvAEZS981suzq8BAlwlYGqm6Fh81rQoxAX7e6zuno4BIpnB8LarkXgHQD9I1 /C82pRplxtU9rI0H/iEMIA7ssOuG+10= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673980859; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iFiAegt8WNgL5MZXxVPS9mQqy9Ss59WQtK/8IB6U8eA=; b=CPh7ECQXMg1FIUIGAXLI8fuFQtQEmsmJE1pjZdGiTevBXEWb7VxRD0lYt1n9iiSR3Krm+a i6fvMqw5fQTPvhd0EfW28EAyEOIYwYkqQSDgC/Z0ZW8FxvihB16dEhDPzS9+gxCjHBteE3 IPnkLrlO0gZ91xz72ba1OVC3mII7rzg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-260-lxBEaWcGM4C8NbHUfeyPBA-1; Tue, 17 Jan 2023 13:40:57 -0500 X-MC-Unique: lxBEaWcGM4C8NbHUfeyPBA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B21F2811E6E; Tue, 17 Jan 2023 18:40:54 +0000 (UTC) Received: from [10.18.17.153] (dhcp-17-153.bos.redhat.com [10.18.17.153]) by smtp.corp.redhat.com (Postfix) with ESMTP id CA68B2166B29; Tue, 17 Jan 2023 18:40:51 +0000 (UTC) Message-ID: <0110b1d1-17c4-49a3-64c0-ad7d7b8cbd29@redhat.com> Date: Tue, 17 Jan 2023 13:40:51 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH RFC v7 00/23] DEPT(Dependency Tracker) Content-Language: en-US To: Boqun Feng , 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 References: <1673235231-30302-1-git-send-email-byungchul.park@lge.com> From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 46BC514000A X-Stat-Signature: o5q47kz5mn4q5rzbwutrboyqew71r8ir X-HE-Tag: 1673980860-917366 X-HE-Meta: U2FsdGVkX1/yvmaM7cK6Eu+KJ3mTQrYQCmZby8lU1EGyX0gp9ZJl1czigSzjX4eKDKTeZFVPzWnwwY1NhPPMTqXM8kySWaOZmhyHHHE3fAxWyuX9wjjkvhoUi3NkqJ88+ShKKqRstEoUVRvo2b1SBR5//pdM4vx79Ajb5nPgNdxkPwYO4Y26/cjvfS1WvDeMlOBHTEeoOIWjwvvioe+AObNDcs/jdGyF8BMIknl/8IUfU80IgysatOGk9m+sE22LJ6WZv7mxDz5h2dtzjjHtFlFo0P3ETSJepS7wDEWxntHYlCvT8J9T22KWj3qWBc2S4rYtb3vGjk1iDPY/CbN0K+PhpP3E4VK6XO8NfSJzXFFGBpSi1gHWDbIMjC+DUHrjhsFJw4g/WJR9JqRsPEJYVfqTCBYvXulOTB5AcaxrIIBU2CKLDdn/OCu2jkUZz3My53hDfCzT2tbMHKqtTWUvfpavpo2egUXPstAkIhXFBLB0gGqcAd4ZIWRts+iO23VNYyavHnrnRdd9+x/O9kO2eps3r35kBX/0K3i7A/JdB4I/Us8eV9dCX9Tq5SuaAEQ/1XeYWel++dBT4V22QRQimR94jo/z2szz0fA4ouj+D70v2k7mW7URSE4jK5KmfKyjZgrMCWyWQQFFsEEdzsBZ1dUs2LJO7BaGeqjcYGK7fEC3xuT/PMmcw3Df3SRV57OSWivkIsSjgtPP1NoJlM7lT8C7aCWgaAT9UQg9IASpU0lgAWWUJnHtRF1mBd2GMfhe4kIdw0MFxZpdcL17AgXDh8zTtze/rL7C0FXR2jNCfLGugnUFseoalP9OJHel2UlfFCB9WwOcYkMDv6cFwtE3aTrAxAXDhp0JrDyOVBSprBWiP7mfYEM0985NXzgkHf6SVGiS27a+B6fHl1x1dBdEcpO9CtLiKxsNmU5SgAj3+KR9rFIrPZ5zH1AAMHRt/MghNfwuebGYzRU= 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: On 1/17/23 13:18, Boqun Feng wrote: > [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. I agree with your suggestions. In fact, the lockdep code itself is one of major overheads when running a debug kernel. If we have another set of parallel dependency tracker, we may slow down a debug kernel even more. So I would rather prefer improving the existing lockdep code instead creating a completely new one. I do agree that the lockdep code itself is now rather complex. A separate dependency tracker, however, may undergo similar transformation over time to become more and more complex due to the needs to meet different requirement and constraints. Cheers, Longman