From patchwork Wed Jan 24 11:59:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byungchul Park X-Patchwork-Id: 13529082 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 78797C47DDF for ; Wed, 24 Jan 2024 12:00:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C5F4F6B0095; Wed, 24 Jan 2024 07:00:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BE7DA8D0008; Wed, 24 Jan 2024 07:00:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A5F9B8D0007; Wed, 24 Jan 2024 07:00:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 854966B0095 for ; Wed, 24 Jan 2024 07:00:04 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 64FB3160639 for ; Wed, 24 Jan 2024 12:00:04 +0000 (UTC) X-FDA: 81714061128.21.0D28139 Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by imf30.hostedemail.com (Postfix) with ESMTP id 5478880025 for ; Wed, 24 Jan 2024 12:00:02 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf30.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706097602; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=tsx4OJbbv28xBP27KcWLTg+OnU1Sn/5XRGXXMTfxVFs=; b=1qxoFRJLiAWFqLcqL5YMNg94xQrT/PdfxFs2r2GDFLZYNsLntfos+kJA/5lu9K6ihIS6NX EkK/y1JnaLfcWt546QjVtxNpBzPSYEIk5T4cEpaFBZvfX29cJwvrLIFooNpWEp0eAMmWLV 8FrDU/4qKPmxtwtYKBym4yYh/IabbDs= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf30.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706097602; a=rsa-sha256; cv=none; b=lEJi3UUMy1v8UNQfXhz7fOWBNXb72g1bmsEXUFm8bTObLrLU/NT46nkgdSPWQmpn2aRErL w215ys7exmNLisnGIpnaGzN9PuDuEAeDtY21TU41mWCtlp2tAAXLZ7+QMbkdfBqpqc/iVP oANm8GrKMWMkNCQ8Xf8A7KLlxeFufgU= X-AuditID: a67dfc5b-d85ff70000001748-25-65b0fbb64f6a From: Byungchul Park To: linux-kernel@vger.kernel.org Cc: 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, 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, 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: [PATCH v11 14/26] locking/lockdep, cpu/hotplus: Use a weaker annotation in AP thread Date: Wed, 24 Jan 2024 20:59:25 +0900 Message-Id: <20240124115938.80132-15-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240124115938.80132-1-byungchul@sk.com> References: <20240124115938.80132-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSW0wTaRTH9/tm5puh2s1YTRjkwd1Gs8rGC8SaIxpDfHC/jZo1IfFhtVkn dBaq3CyCYjSCVkAu3giwKEFALU0p0i1m44IYqBHBC1asCgSrEKMSiyhatFIvBePLyS/n/P+/ pyMwmhZurmBM3aWYUuVkLVGxqtGZtYv/m3Qoy8rtS+FE8TLwvytgoarJTsB9oQGB/WIuhpFr v8HDCR+Cydt3GKgocyOoHXrEwMVOL4I260EC957+CB7/GIHusiICh842Ebj7MohhsPwkhgbn Rrh5vA5De+A5CxUjBE5XHMKh8QJDwGLjwZKzAIatp3gIDkVDt/cBB20Dv0Jl9SCBy23dLHRe GsZwr6WKgNf+hYObnV0suE+UcND4qo7AywkLAxb/GA+97TUYHOaQKO/tZw6ul7RjyDv3LwZP fyuCKwVPMDjtDwhc9fswNDvLGPhYfw3B8NFRHg4XB3g4nXsUQdHhchbufLrOgXlQB5Mfqkhc LL3qG2OouXk3b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ujPHmYgLXOKgSsp2QjOpeWS8OLnEwr0vcHg/lFAbwkVGoZGCUFf dUJwTBaRwrMSXriX/5YR9LU9jFBkjxeqygKE0oeDWCgec1GC3XqWFuxjJkYwDHdgYaS1lRGe 5rlJ4UOHGe9eEiHZdFhUKRNEzbrNUZIYZ+FLdPwGk3gxxUknoyzagLxYngvi37WlMLNMcyv5 7u4pYpZ9OH++KusjZUASluDOzOXLvj73PLDsAu4Qr8+Ins2Q3HK+f6aPnGUpF8KfefCd+udc xpdX1v31eHn2ty73/M3IuGD+vfU8cwFJitAcK/JRxiaoFUpV8Frt0ZikWGXi2uhjajvydMZy esZYgybaw+oRxyL5POkWa4UooxQJ2iR1PeJZQu4j7V50W5RJDyuSToqaY5GaeJWorUeLWVLu K92xT4yScUcUceJRUTwuav5fMevll4y88/bopGrvrt966/4wVdw48t2wN68ndclih7Eln3m9 ovsRPwBXmcSBWt/oYrw9U1fYGFl4szRd1xg+bbD/XGhYJY8IVZuWRu48cNB78lKnO+CzLWSg OHt6bFfkqv2KmDW5ERv9t1aOk6ao9i7zKeNF79ZvPx4HFcY1BY294wK3yUltjCIwgNBoFX8A 2+WWAC8DAAA= X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 5478880025 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 58kf1sxnn9cu5ypwwemfjkn78hepq5rp X-HE-Tag: 1706097602-894461 X-HE-Meta: U2FsdGVkX187336TvANLWzkkZ/+S9a5uEMrPjwlXaHYSFz9AUtkBSVLZjqJKnHeEJXRmrFqQg1YV4XbR3aRCVm8Zs4ebLv4MoRgpwvHBRqGry1TBk7f4k1crVzPTD/FM8UBe3dRNASg2495XtGZDRakDZTHx1LOY0mA4RjlBPnIBHlXbP2NCSoSmBXM8QPbDsqNDOThGxaxafAyCojVyQyD9PLpwey1phTOwnGrm5dyUoyPPRbpR5sNsaWa7rqXz1w5dRhuIAi+NyZv6GSMnJw4DPNfQvzpg/d9GPg2SV5mH3nyautdJX8HQ1eCnCo/WwIy2oqxDan0XWAfZcIvSrK/n4J5MBO9icYQgDNe2MJeLllLWoL3NhTWEfdaMFzWdNN9SD9IwEsPhwVq2ThbOYsvUrqIIQc7uTsAJAeVQerBr2iiJ2O317REI660DcoyUMwxrSSi/+GM3c5LPnyZqCTZb4ErXF7xJtmuTtj6t7qCddouUmrr5rOeZDGA6wuCDoFkuAVEZ8bSjGk7IX14UKY1rJakd8uxWd6OeMkw2B6Ws/L2Q45Vv0WE9CPeovCU3BOwIEaTHhbARbErd7i9k6tqyQ3ktl3On/zTPKoHMsNsk2tSfuU9NZkjaRbUhgtjl5ldVmp2HoEm1ifMEEWyrx6SgRZuramTpY1Zz5SwD8qV9dMVYpJ+FoptVq9+eJ1ntuoxb4wOxl3HoDGssfP90YcHDUlk+yVTQEPoJGHjtQt/EFZjJrn22BDEA/xdbr3rbSIEQlsi9PKsZcqpLR+VR31cjA/PUym92VmcqL6rSUhUsaGZgxdMgmFD/jiSssjwQIifvO0JooGcMManLSzwDa6xZVoZ6uONE8d0ULORKppN0zykhWXVgvI/5jV5Eoc+Z8+cvj1EkLQIy5DpsAZ126i9qhRZ7cEB9PGD+phoBXNQOZZmrAOZbXbngwuSHW7hDyqZk+aW0jtHamcIpG+e SjbS5aoW BpeOfX17OgBiJBIHdO4ziNpRXLywz5kKLXWSzgxh81Mr+TzOsso8Ed5rguYzSrkDAySr0 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: List-Subscribe: List-Unsubscribe: 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. Furthermore, now that Dept was introduced, false positive alarms was reported by that. Replaced it with try lock annotation. Signed-off-by: Byungchul Park --- kernel/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index a86972a91991..b708989f789f 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -535,7 +535,7 @@ int lockdep_is_cpus_held(void) static void lockdep_acquire_cpus_lock(void) { - rwsem_acquire(&cpu_hotplug_lock.dep_map, 0, 0, _THIS_IP_); + rwsem_acquire(&cpu_hotplug_lock.dep_map, 0, 1, _THIS_IP_); } static void lockdep_release_cpus_lock(void)