Message ID | 20240221094933.36348-15-byungchul@sk.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 E3860C5478B for <linux-mm@archiver.kernel.org>; Wed, 21 Feb 2024 09:50:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 117D86B0095; Wed, 21 Feb 2024 04:50:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0C9716B0096; Wed, 21 Feb 2024 04:50:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E0ED96B0099; Wed, 21 Feb 2024 04:50:00 -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 B47AB6B0096 for <linux-mm@kvack.org>; Wed, 21 Feb 2024 04:50:00 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 9527C1A0990 for <linux-mm@kvack.org>; Wed, 21 Feb 2024 09:50:00 +0000 (UTC) X-FDA: 81815339760.29.BAC4893 Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by imf01.hostedemail.com (Postfix) with ESMTP id BA7AF40003 for <linux-mm@kvack.org>; Wed, 21 Feb 2024 09:49:58 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708508999; 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=e5cHn1JijalHUH7ycLz92DIHggvUMO7Y1uKQlQu2opI=; b=rC725Wog5ltbQRimcFLNQ9OvbwAVsYCDibkp3Y0uUXRsaiXMw2/Q91Ltuzv2Ehjujcwmoa mfxbtURtMs3uvxY7TxYc6dsGsz4dMQZ+PYVdzlzmwocQ4D2D3pY9Ixd52Sq2nHhJnXXQJN i45Q8zxojSCy+3FOLzROwiU7kSmuAwE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708508999; a=rsa-sha256; cv=none; b=T6qOVKYb1c2zAJYavPAmQ0dnbjPjeFcmQ0I+i7Lq8RhKn/qMB0R8oNgllNd7B/6ZaUdF82 ZhLDKzi6zMc5P+9Q6t9DCCX/REevJ3y+Pch2hlLIyslLRLxspj9a6psah7PBX/nYMS5SII z/JJ7crPk6JI9V0suS/2B3jkPzsTaA4= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com; dmarc=none X-AuditID: a67dfc5b-d85ff70000001748-68-65d5c73a67e7 From: Byungchul Park <byungchul@sk.com> 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 v12 14/27] cpu/hotplug: Use a weaker annotation in AP thread Date: Wed, 21 Feb 2024 18:49:20 +0900 Message-Id: <20240221094933.36348-15-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240221094933.36348-1-byungchul@sk.com> References: <20240221094933.36348-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSe2yLexjH/X7vtbXypiZ7Rw4nTRZM3IeHCP7ZOa9jE3GJGEHpG2usG93s IhGzSzmziZKt2DLdSHVbsXUuY7rUsAsZHS0lM9PIOWadyaal21xa4p8nn3y/+X7+elhCfpOa xKqT00RtsjJJQUtJaX9YxaylrS5xbk+5HPSFc8H36SgJZVcsNDgu1yCwXD2Moff+3/Dc70Uw 0vGYAEOxA0HFm1cEXG3pRmAz59Dw9O04cPoGaGgvPkZD7vkrNHT2jWLoKjmJocYaDw9PVGKw B/4nwdBLQ6khFwfPOwwBUzUDpuwo8JjPMjD6Zh60dz+jwPZyJpwp76Lhtq2dhJYGD4ant8po 6LZ8p+BhSxsJDn0RBZc+VNLQ5zcRYPINMPDEbsRQmxcU6Ya+UdBaZMegu1CHwfmiEUHT0R4M VsszGu76vBjqrcUEDF+8j8BzvJ+B/MIAA6WHjyM4ll9Cwu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U4q882q0bN5elHpSxqNdDy/tNhogKATK7+ExBChlEUVtkD0zOlt47ShL57RhsK6SW1Eh0BJzkESNmhvhSN9s1/p0MQU7IQw79ynpWVOaPmyN7X3wJsxNy3yOLkGgs6qViBBSEo5nST7odiL2t060XV1GNzbV5GO6eCbqy5kh5H1OpGohwX3FNy93ItlJGULEQ2Dit2WPviWypyd6IdZkK/BEIO6z1nxBU2adsvEpTJJ3sHs6qSgVDLU+aCp4IRZEirlQTHRjKNdwRtYW02z1MDD+qQ/REyzbqsN9A0O1iAVs9LeJE0hmTWwod9vvzRIdOepExmeXMi18U/WKqfEwSlsrPtlmdeua4lWx1YZUXzpGKewHklPNPRYpmf0a2ORCLgU9czoxuhiYwxYvp5eOCzTm0HydM2JTwA2i+ikkwdhpxvvZO1OccTj8yQ48t1KFir4Zl4RETmFiz4v66yY7mXhbPPD0uqfps8T4Tmxzcmxa5i3OfS5AsufqY9/giByxnxsAsQ5XsAYCaAR5Qp8us9fDZ7EBh2WR9GUwI4uuDNKN4MyAG+x+cF9fT7B77gAf+XMfDRz6RATLtuetsjQ3fX9vLlCdJ7p1rpejOfgN2Mm6gjZOIjo1SaU0xvMPdaCovKSF4uMDxYfAxgeWCEc5u9/CclfhlnPFcRaLAcA3pUz6jr6A3nQrtrk0CZWlfpTiPtRGjMVDbQDyKO/xea9ggNJOWbte7QWYSLpi zhesuVlt KteQHLAYgS/eu/trM+CFNGNj/RZPyjIhKmoVEJ0+EScYbXA4pT0m2uGIDIHcHJYpdfRbJ 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
DEPT(Dependency Tracker)
|
expand
|
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)
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. 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. So trylock version of annotation is sufficient for that purpose. Now that dept partially relies on lockdep annotaions, dept interpets rwsem_acquire() as a potential wait and might report a deadlock by the wait. So replaced it with trylock version of annotation. Signed-off-by: Byungchul Park <byungchul@sk.com> --- kernel/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)