Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp440259pxp; Wed, 16 Mar 2022 08:47:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwp1g280oZ1jczErbQ4ONOzPugicMuaDd0cOo0XxTPPWdcfOemlePSxwQUXoKLcHOHpcVuG X-Received: by 2002:a17:907:a0c8:b0:6db:5733:aebf with SMTP id hw8-20020a170907a0c800b006db5733aebfmr486696ejc.263.1647445677032; Wed, 16 Mar 2022 08:47:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647445677; cv=none; d=google.com; s=arc-20160816; b=OZ4kl43oh5O8frEwjpHzOx284+2AaXrJFLdMNwZf76kqZp9D5cdd6rYe8OcGWJ9fUT 2RCyNfv98BrdxMN1Q7qPpzqIGsoZsc+HmbiZhO7grx2jG3bUGBX0eL49f8ze9cXyZwsL W3wiqhXupbNJWGUOnIc4R9XlnXXnZmQ1z3CUIGhixxFnlHIhS5PcLGk3xqBNNJlW/Q47 s8rVeWJrTjvN0A5IktKckxBB0007vcT6wnDW6Bq2rr+wQAAuL+9JdxUaqr6hUpPAEmxu 24z/QYJFxeL6YcToEN3Lp5GWnwOx0PO9QHUvj11Bw09b2WzmEw+4j1/VBHrCymyNkNxQ kgGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=jdRk7HjQqBBP2tgLJ8O7mZ4MiNtTSUWPl9yy+qU9pSQ=; b=fEhYOUGiMd1XsD5RvpSkC020k9ibxtKMqgK+Qxu8IvxjZXHSwLhoUaJwH3oHoTgfWm bY5KIXoQ3e+v8qMrlELezLap/e7fBL0BL0/V3j3jtEe3eXXDyz9jAedZLmuEzLMYzHif BjwI+H68frLxGmLI1IB/GCAfFT+5FyDXrlwXIdA/8AmCAMoZWZaKBLJ1SZE9wnEfkuDc BrWHp2a+do0rizD36R0324Du1o0wo4Fp++sQrtTWHAuecz2FC1v2eMDtNDLRwZN/uZ2Y xQTGVWb2RuYSmR+SKNFnlXyFNbrOXXsEMmwvi1MgIEgYkU9+0qogYtWMTuzAjlWER418 vHGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s21-20020a056402521500b00415baee8ba5si1570286edd.252.2022.03.16.08.47.29; Wed, 16 Mar 2022 08:47:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353163AbiCPC3u (ORCPT + 99 others); Tue, 15 Mar 2022 22:29:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353240AbiCPC3N (ORCPT ); Tue, 15 Mar 2022 22:29:13 -0400 Received: from lgeamrelo11.lge.com (lgeamrelo12.lge.com [156.147.23.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A4E725F244 for ; Tue, 15 Mar 2022 19:27:12 -0700 (PDT) Received: from unknown (HELO lgemrelse7q.lge.com) (156.147.1.151) by 156.147.23.52 with ESMTP; 16 Mar 2022 11:27:11 +0900 X-Original-SENDERIP: 156.147.1.151 X-Original-MAILFROM: byungchul.park@lge.com Received: from unknown (HELO localhost.localdomain) (10.177.244.38) by 156.147.1.151 with ESMTP; 16 Mar 2022 11:27:11 +0900 X-Original-SENDERIP: 10.177.244.38 X-Original-MAILFROM: byungchul.park@lge.com From: Byungchul Park To: torvalds@linux-foundation.org Cc: damien.lemoal@opensource.wdc.com, linux-ide@vger.kernel.org, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, mingo@redhat.com, linux-kernel@vger.kernel.org, peterz@infradead.org, will@kernel.org, tglx@linutronix.de, rostedt@goodmis.org, joel@joelfernandes.org, sashal@kernel.org, daniel.vetter@ffwll.ch, chris@chris-wilson.co.uk, duyuyang@gmail.com, johannes.berg@intel.com, tj@kernel.org, tytso@mit.edu, willy@infradead.org, david@fromorbit.com, amir73il@gmail.com, bfields@fieldses.org, 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, jack@suse.com, jlayton@kernel.org, dan.j.williams@intel.com, hch@infradead.org, djwong@kernel.org, dri-devel@lists.freedesktop.org, airlied@linux.ie, rodrigosiqueiramelo@gmail.com, melissa.srw@gmail.com, hamohammed.sa@gmail.com Subject: [PATCH RFC v5 15/21] locking/lockdep, cpu/hotplus: Use a weaker annotation in AP thread Date: Wed, 16 Mar 2022 11:26:27 +0900 Message-Id: <1647397593-16747-16-git-send-email-byungchul.park@lge.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1647397593-16747-1-git-send-email-byungchul.park@lge.com> References: <1647397593-16747-1-git-send-email-byungchul.park@lge.com> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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 407a256..1f92a42 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -355,7 +355,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) -- 1.9.1