Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp175422rdb; Sun, 28 Jan 2024 20:21:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IGERnl64S//JTjHuyAygekUR5Md8pS5LWMl8wLkIc1jgb0wtSxyg6rhQGnDN5NR4wfCn6U/ X-Received: by 2002:a25:d815:0:b0:dbe:2063:72b9 with SMTP id p21-20020a25d815000000b00dbe206372b9mr1567728ybg.50.1706502090657; Sun, 28 Jan 2024 20:21:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706502090; cv=pass; d=google.com; s=arc-20160816; b=iQhKtHBJ0pL/ebcOwgbJTqMNkaVMyQVVUK9bBKkbGEEybOOrwCCdcvi1nmUhiVUeYS 9btC+S1BAQpwcywGh1V1rGDizwIPCUdeOCO/gbIfHHJmfLqffnQ3jb76OEXiLmZE/BYP Q/jyxe52exr1pvsNnqm1ufpYVCsEOhNFEJR3bRnsKHFzyvwTsyr9zFTkogDTwji2QYRS okGmNs/EJ9ZZ10ZFa/ovO7AqKeZCWjPyBTpExfylmB2AvHNE8S0SqESsodeEY0ST+Xdc 3JRFwa6yd6ETRZHx2tRO26MhCSI171B84jTj2MnFlXx2tHYDos/y4aO2yRKVi3KjGhqj 7Hxg== 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=5/cmIhAljTHzuCwQbDhI0E5m4QLFEkAEsRHaW/5ue1k=; fh=u5N7+1qsBsp21YqFBKH4UWOSuorYoZ9ENcbjk0Q1yOQ=; b=jq4DvA5edyE1mlo5WclOWZ4+smLwDkBlRP2+CJvKsHnOPgGOR/8Gv1uPTBltehbVRm DL/WGZe9Vvta6GdBxPFtz79lxyo4tUOL6yNnlGAAyx/ARldepHVKlgEYu8BHDePgkpKG BnmqIKNxg08cuPS7js1zs6b1vZC+zPGlq9xvExnLg9DCzb+ggqe6DRsptnBwpC9XQR23 Tqzq0Gypvx+cFsK078RbAropupt0gIDLFCq22zxGGw8YW7NqOW+wy8b4OYRO4lBEgmHE VLSfAfxxI2rc5g7S4Z5MJV/i3t9sbE4aMqjXDXXWwb0CdtwKRdEDTpJ8R75BWB7bsIdh mxsw== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-42155-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42155-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l33-20020a635b61000000b005ceea21d9ccsi4913731pgm.771.2024.01.28.20.21.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 20:21:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42155-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-42155-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42155-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4D39528436D for ; Mon, 29 Jan 2024 04:21:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0FAC02576D; Mon, 29 Jan 2024 04:21:15 +0000 (UTC) Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8942314AAA; Mon, 29 Jan 2024 04:21:07 +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=1706502074; cv=none; b=O21hvGkGh1AC0260mqyRrWj7y0+UFS2YTL1xAZ+lX/6BxJD5iJ2/QpApfQR29oOzC27ms7T9VHKCk2wjfD8tKvwEmKlNyRTBqcF8VkzfrAogX+KkipSqrJBhuJ3gCwjP6nKN0Bx5Sjf2jAsRgZ8s1HbWT4C5TNF0kdNz1vnfHpo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706502074; c=relaxed/simple; bh=p9WW5tw9S4aGXrjQWbwDneSN3suFm+njtOg9nHFdRRg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VkFQriJ8vTZDCUn5pPIfGKeDFJpmi8iUvxnlPHKY+ptx0TblM4sek4qQyFo9kvw1Nwk/az7EQ2cGMp8RmmHvWYFooKLOwusi8gABeXiLMmD28UZ8AZw6TYPFzNnukMNE/JTy5HrFz19HpjHJdfaL2Sy/sZVjXIPrsXeuxnbFplE= 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-d6dff70000001748-0b-65b727aa4de6 Date: Mon, 29 Jan 2024 13:20:52 +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: <20240129042052.GA64402@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-kernel@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: H4sIAAAAAAAAA03SX0xTVxzAcc+5f9vQ5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aExh99e2vpbM/krK4FxQ3PncgdN/40Olw/qD935cHK87X/LDZF71neeSh+giT fnrzIqPc3Vf3R/zetDlr5q2MgdoXo8fiNQnblqhoXZJ6Qwyl1ak/AnGPtF9zAwAA 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? I will fix the typo ;( Thank you. I referred to the commit cb92173d1f047. I will remove the prefix if the way is more desirable. > > 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. rwsem_acquire() implies: 1. might be a waiter on contention of the lock. 2. enter to the critical section of the lock. All we need in here is to act 2, not 1. That's why I suggested trylock version of annotation for that purpose. Now that dept partially replies on lockdep annotaions for the waiters and events, dept is interpeting rwsem_acquire() as a potential waiter and reports a deadlock by the wait. Of course, the first priority should be not to change the current behavior. I think the change from non-trylock to trylock for the annotation won't. Or am I missing something? Byungchul > > 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. > > Thanks, > > tglx