Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp765078rdb; Mon, 29 Jan 2024 18:59:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhmy5d+7lkqWFfC20UaW3uAsapWFWgajVp2gRLriudlIT3xNKMHf40HG4LqqcNW5ZzA46+ X-Received: by 2002:a05:620a:565a:b0:783:3750:44c3 with SMTP id vw26-20020a05620a565a00b00783375044c3mr6674877qkn.39.1706583543185; Mon, 29 Jan 2024 18:59:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706583543; cv=pass; d=google.com; s=arc-20160816; b=y/V1f30KOE3SkTu+JKXBgx3W3UuGWqqxtTWt6iBRxAr6EDKJrVOa3IynsHzW6Dh7dR /wKc/oJOS217soKgAOe8hiCI2MC2zvLM+dFAHw3VZ1/P8j8hVtObuMRYb9vhleUujohw xUdkDZoBMY64XV+pDblCcYTBHk90yseT/8LneE6s5c8NwOlFpF/g6qfxFav/OjWx0T1L 6qY1gVteHf1hHt3gHyAa3RuTGff9/kWHw6PxxkXHYgqH68p3Fngk37kqyiKCQWo1ppah rxdiSUeSVItTXcZF2XAgCwaCKs9ia8LYAKCzZL0VUdueYtWlK103t6TBW7Q9h2c4UdjA 2gpA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=XyoD4mD2jPK5621tynU8elgG51ZJpKSXF7tThlrX708=; fh=u5N7+1qsBsp21YqFBKH4UWOSuorYoZ9ENcbjk0Q1yOQ=; b=YLZF4ZBGOstZ0WpCBOvTUHtgOr4HBAIxQSRJ7NpgJ7a1im7OBe+t0A7TyfPEy84H/w 9Er6UpGSpNNPeVcGPBGcSyVY34P00jcEE1D3Une5wp++bILgbxPxInAL0GgItFuCjBmq CFus2jDyI3LkIFYO7hRk5cTEEoVWQGmUhPoyIpJpyiVFFi3erNrOXaWUzkRdG3M2Aepd cuyen0EMBCpS4r7N1Le/kOG/LiZrII27F33Se7vX0LC5MlgDGUqscFcXzKgo6tGZoTeg IK6RkuadLzqhAhK0VjzWRCSl1dUpuP9xVC/bCiLam8+CG1PW5a9ewKL8v4rxKQPqERFf EWgA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-ext4+bounces-1014-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1014-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f19-20020a05620a409300b007840a927b40si800493qko.434.2024.01.29.18.59.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 18:59:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1014-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-ext4+bounces-1014-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1014-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EA84F1C23416 for ; Tue, 30 Jan 2024 02:59:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 251BD37171; Tue, 30 Jan 2024 02:58:51 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC06D36AE9; Tue, 30 Jan 2024 02:58:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=166.125.252.92 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706583530; cv=none; b=HBarTKCqYR6Y61lDLKYeCnYE/CxI/wsxcDbh3hvYd8BwiGJOKGSdK7MyLoSP5+sYY87bIpj5mRoGf3Ep8VfsQ4QWRQlKxAG6jKDyuoOfY4gJjqeb7mO1D9FfR1aWk9WBzgVIr1khnQhrUy6tC4i8jSaDv41XSAn7MIqhFkjTlY8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706583530; c=relaxed/simple; bh=AbZE0B3FO5+TtB5HOi5ZjpCgzTcHcZXFvQyGWmlwlXQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YtIBHI26ClMrkER7F2wcUdoPaXPSvejAaDbRP2mwpUECXQS/WP6cy9BfCqqfy7CpWJsnnIxZgt+Q37F+yqCu6tuU3PdCo0hO7FnFq+wXB0Q+AVyo22BPQZMAxkPxwbKIajViFHTmceNq2xiG8dc+a++F2VR8Yenl+/A3nWVvPRA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com; spf=pass smtp.mailfrom=sk.com; arc=none smtp.client-ip=166.125.252.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sk.com X-AuditID: a67dfc5b-d85ff70000001748-1d-65b865e1c3ac Date: Tue, 30 Jan 2024 11:58:36 +0900 From: Byungchul Park To: Thomas Gleixner 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, 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, 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 v11 14/26] locking/lockdep, cpu/hotplus: Use a weaker annotation in AP thread Message-ID: <20240130025836.GA49173@system.software.com> References: <20240124115938.80132-1-byungchul@sk.com> <20240124115938.80132-15-byungchul@sk.com> <87il3ggfz9.ffs@tglx> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87il3ggfz9.ffs@tglx> User-Agent: Mutt/1.9.4 (2018-02-28) X-Brightmail-Tracker: H4sIAAAAAAAAA02SbUyTVxTHc5/3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JhPW7zdV2pOS9C19 87xr47a5N0yZsfxa0M2ZR7ae+2llFTlbohKWhS8wjSbzh9c5DjcqTxjy47M3tRuk40y/uSj0 8gH3JPWYeKPnbdAJf+Wb10l0i05F6yM1oSGUTq/5Bd0J6+p0AwAA X-CFilter-Loop: Reflected On Fri, Jan 26, 2024 at 06:30:02PM +0100, Thomas Gleixner wrote: > On Wed, Jan 24 2024 at 20:59, Byungchul Park wrote: > > Why is lockdep in the subsystem prefix here? You are changing the CPU > hotplug (not hotplus) code, right? > > > cb92173d1f0 ("locking/lockdep, cpu/hotplug: Annotate AP thread") was > > introduced to make lockdep_assert_cpus_held() work in AP thread. > > > > However, the annotation is too strong for that purpose. We don't have to > > use more than try lock annotation for that. > > This lacks a proper explanation why this is too strong. > > > Furthermore, now that Dept was introduced, false positive alarms was > > reported by that. Replaced it with try lock annotation. > > I still have zero idea what this is about. 1. can track PG_locked that is a potential deadlock trigger. https://lore.kernel.org/lkml/1674268856-31807-1-git-send-email-byungchul.park@lge.com/ 2. can track any waits/events e.g. wait_for_xxx(), dma fence and so on. 3. easy to annotate using dept_wait() on waits, dept_event() on events. 4. track read lock better way instead of the ugly way, by assinging wait or event annotations onto read lock and write lock. For instrance, a read lock is annotated as a potential waiter for its write unlock, and a write lock is annotated as a potential waiter for either write unlock or read unlock. I'd like to remove unnecessary complexity on deadlock detection and add additional functionality by making it do what the type of tool exactly should do. Byungchul > Thanks, > > tglx