Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16063848rwd; Mon, 26 Jun 2023 05:24:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ72mjYDaAAGCyD3fuzGRVxekdPGo6XKzooranci30nUuwtMTEAOhwgcOHIixdWdWptt3qLy X-Received: by 2002:a05:6808:30a4:b0:3a1:eccc:26da with SMTP id bl36-20020a05680830a400b003a1eccc26damr555059oib.25.1687782239763; Mon, 26 Jun 2023 05:23:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687782239; cv=none; d=google.com; s=arc-20160816; b=Z9dObdYpHCIBHqY3neNKDLPSTrSF7teHepSgRrG8raRNCpMf1haQT1RZPzuRVtXzHM Q0E72/H+3Iu3RQe+XL4OFb/htHaUbr5FTj/OYW0roK/MOGe89xG18eB6a6iGzMaFdwY9 m8lYb7Oraef47bCjoODQJq8wcbEVl/+f0sROiCrhDBgHRv1w8yZeuYp6vzagUZzr64ty XHXdRf1C9yHD2HCd6i69b3rT+U+AV7+3pXHXJDBd85jCbqVHOByV+R7fMVevm66FUiFq g9DiGPVblHqUVB5Mtp6ZPR+SgrdM55GaBdyosB3HE6M+4Uw/digKd5HM+CEAuBCQ1JRw Di0g== 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=Qn6JTi9qI4KdXE4hVcFEyI4pRFrskKFEq7qNrOJ8tXg=; fh=XRjqVsBnH3A79ze0TZdn1GaMzocAY5TCjIrpk6ynN2Y=; b=YLESAVOm9WadLI14rIw1/b3WqEYwjP/XG1EdjOG4IDeRPswd1QG2OyDSdmLrHphhfd XXE6EAJWL5eAWWxJz0aqMjaaQBUj6bPwohj4fkDDy79+y6/TJgv/5pzqOnYLm/YW9tQW geRS2FcBxL40dvFe3KqBn9LJtUfu03yd+xKlE81iZmk0R+Xj2YrEl7erEopkTqkC62Me izrWbx5vYNTw1nVHqCkpSWgUEMfRoV23k6thG0oHFC41d86cxZWx7zzBjgsD0pp3FcUB UwvVJQc6BBwEKzG1AyUkC+0cu4HHil4+TKd1zCDIx/s0H1Hz6f93a2EebTVxrUo7ZJvM fQuw== 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 bj22-20020a17090b089600b002630bfee70csi41012pjb.21.2023.06.26.05.23.46; Mon, 26 Jun 2023 05:23:59 -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 S230356AbjFZMTg (ORCPT + 99 others); Mon, 26 Jun 2023 08:19:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230317AbjFZMT2 (ORCPT ); Mon, 26 Jun 2023 08:19:28 -0400 Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4E32210DB; Mon, 26 Jun 2023 05:19:03 -0700 (PDT) X-AuditID: a67dfc5b-d85ff70000001748-8d-64997d6d8ce5 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, paolo.valente@linaro.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 v10 15/25] locking/lockdep, cpu/hotplus: Use a weaker annotation in AP thread Date: Mon, 26 Jun 2023 20:56:50 +0900 Message-Id: <20230626115700.13873-16-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230626115700.13873-1-byungchul@sk.com> References: <20230626115700.13873-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSbUxTZxTH9zz33ueWaslNJXp1Zm51RoOK1ag5RiKaLPFmyZJlhC+yRRt6 lUaoWCyKhqUqGiigokIVO4ViagOdYOGDAlVW5G2ooDSsw4pCDAgUcbhWK+1m68uXk1/O/5zf +XIklPwOs0ii0R4QdVpVhoJIaenU3KrVmXkX1UrbmzgoLVaC/98CGsx1dgJ912sR2BuPYhhv 3w5/BXwIZu/3UmAq60NQNfyEgs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rC0/y2dTkrdUdKNdFPu9ZA4clo8L/Lo8FyqZ5Az391COqvHMMw0roJ Hk6OIZjuvktBcVEPgvJnjym40uZF4KjJJtD7fC70+X0EOosKCORUXiJwb3QGg+fcGQx19q3Q dboCg3PqJQ3FIwTOF+fgwHmFYcpWy4ItKxKGa8pYmHkWA53efgbcFzoZcAz+DKUXPQSaHZ00 tF0bxtDbZCHgrf/MQFdbBw09hWYG/h2vIDA6aaPA5vexcN9pxdBgCthezzgwHH/7iYF2szNA VZcx9D26gaAl7ykGe30/Abd/DEOjvYiCD9WtCIZPvWEh9+QUC+ePnUJQkHuOhrsf2xkweeJg +r2FbIyX3GM+SjI1HpYck1ZaulUhStfLHrOSqWWQlaz2Q1JjzQqpsnkES+UTfkay154gkn3i DCvlv+nDkqe/mUjjd+6wUkfJNJ2wcDcfr5F12nTZsGp9Ip/0f+sgTq1mMz5aorKQmeSjEE4U YkV3mYsOMhGWigMDU1SQQ4UIsdH8gslHPEcJlbPFlx032WDxo7BXfNE9xgSZFiLFpuYCFGSF sFo8cbbjm3SxWNfg/CoKCeQ3bld83SiFODHb4yKnEW9Fs2pRqDYlXa/W6uKijMlJmSnajKi/ DurtKPA4tiMzhdfQu95NLiRwSDVHEb2oRKNk1OnGTL0LiRylClWEvS/WKBUadeY/suHgn4ZD OtnoQgs4WjVfsfl3OVEp7FenycmynCobvreYCwnPQtl5Dd7hCc8eH47cubo6Iz831qVur3vS WvYTN17irvo1jt9iOmzOu3Uhmd8neq87x807IkZTE/j9P2zfsX3ZhrXhYV7Hk6HZaB7auU1s 8nXrN3hT52r7jg798iA6Yf7f5Qn6q4548/IlEW2/LaVjLeELHgwd+KMqrdSqjdk1p3dtg4o2 JqljVlAGo/oLfVzQwzQDAAA= X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 6c0a92ca6bb5..6a9b9c3d90a1 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -356,7 +356,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) -- 2.17.1