Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2167976rda; Tue, 24 Oct 2023 14:47:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH73eGy3YFMQJSeB43kGRbTDUSbud9lOgzxIod1LZFoR7Wuczt3oQMYjnZvPZqH2A90mMfy X-Received: by 2002:a05:6a20:12c3:b0:159:f884:4d72 with SMTP id v3-20020a056a2012c300b00159f8844d72mr4069261pzg.42.1698184023900; Tue, 24 Oct 2023 14:47:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698184023; cv=none; d=google.com; s=arc-20160816; b=z4ESi7vcBUviYBGPFp5GsPIkp1UdlmUC+lEMkWSwD5R11D2BU3/ZgivLRJwqIy07AJ u48TrCcMtq+KWoFv4gkzNISaburCDTWGkkn9zFTcphyTnM4ZFvk21KWWlq74LJgR1d1V 1PRGtZf5+eW0a5tQvbj8YkLQ5njoRQhD7A/12bJYvHTfb4YDvEgqZ9s1swR6DByCAt/N BQVsVSjYF99qhi7etrYGUlrW4lQ0urG7jah1CESrB9LNscyGmSOTLf9B3pF8p2TKAJ5L FmGLZWe06CDOUW/u8JTD8vOU6Gu5/1i1VZdeOhNp0IeR0CLkRBT+qSTAHVR/kLNbkz+v OhIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vtgj67I3koTvKTmVNZcijT3znViLr5LAUhFxAxHC3Zs=; fh=kjhz86PwvLs0DCSx3CYZ93RH/zcHDwqZp0T+KAJhehM=; b=UavXLJqOVOGKh4Ety/5Y+4nmFzIcAt95kF840gBxuEnCMbfFS4SDqtYklAH4m9bUbf +89XN3S2PS3V3wbikpGO9Lz4Pt3DhMP8xgmfLyq2saHeGBvXfXalcIHirTXVLmm04qmB syPCRK/67IbefmT6prKzrCJwydeho3NbAz5ktUXKAV8O28zT3/TMn4YwIqHJGGZo7YFy wYVA6I1eGnqFfGODNk+b2ppquixidPDq/oULCLpmHPe96TYj93d9SkQUfnsMRoq24pTm JucAXSXGuv1lxHqmNEKZsml47EbtmRuvxBYRLDYdfqQexACReCotPnN87BJ17PkT2Ysu DmZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=usKGKhB8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id by7-20020a056a02058700b005b902b61cbcsi361811pgb.723.2023.10.24.14.47.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 14:47:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=usKGKhB8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 52EA380220A7; Tue, 24 Oct 2023 14:47:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344482AbjJXVqw (ORCPT + 99 others); Tue, 24 Oct 2023 17:46:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234984AbjJXVqs (ORCPT ); Tue, 24 Oct 2023 17:46:48 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5F73D7F; Tue, 24 Oct 2023 14:46:45 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FE7FC433C8; Tue, 24 Oct 2023 21:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698184005; bh=SWH3H5Xdn3J5BOiYP+tbzdRJbhkTqpBLrBJhKbzm4Fo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=usKGKhB8JfO8caii44hKkyfsLAu0qLEivqPpVb5HoIyzboKeu0t9NOqlr5pq7VhBt QA6eSDiSI63VG1CG6dLZo9glJsKFKPHBIK1xN/syP7JfBPcjUxlBYf1rMg/r+u788I gP/+BztEMPJ5FUutfZ6KmeUL3wrg42cVHmg0igQIQMnK0sI04vsAiAmmnvmziFhbEM zh4nYA71JTFaW6qLDN/S7uwATgtoGBwyhJuex65txdCp8/8IWlstvWppT4gc+fJyB4 gcZ1zbzHYqU7Wy+743hSyHh2TLnFRa0PSdwqvwWaxOwLyC8AK3Db0MGYsps52afPoQ rn+mH6j3kFvkQ== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Boqun Feng , Joel Fernandes , Josh Triplett , Lai Jiangshan , Mathieu Desnoyers , Neeraj Upadhyay , "Paul E . McKenney" , Steven Rostedt , Uladzislau Rezki , Zqiang , rcu , "Liam R . Howlett" , Peter Zijlstra , Naresh Kamboju Subject: [PATCH 3/4] rcu/tasks-trace: Handle new PF_IDLE semantics Date: Tue, 24 Oct 2023 23:46:24 +0200 Message-ID: <20231024214625.6483-4-frederic@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231024214625.6483-1-frederic@kernel.org> References: <20231024214625.6483-1-frederic@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 24 Oct 2023 14:47:01 -0700 (PDT) The commit: cff9b2332ab7 ("kernel/sched: Modify initial boot task idle setup") has changed the semantics of what is to be considered an idle task in such a way that the idle task of an offline CPU may not carry the PF_IDLE flag anymore. However RCU-tasks-trace tests the opposite assertion, still assuming that idle tasks carry the PF_IDLE flag during their whole lifecycle. Remove this assumption to avoid spurious warnings but keep the initial test verifying that the idle task is the current task on any offline CPU. Reported-by: Naresh Kamboju Fixes: cff9b2332ab7 ("kernel/sched: Modify initial boot task idle setup") Suggested-by: Joel Fernandes Suggested-by: Paul E . McKenney" Signed-off-by: Frederic Weisbecker --- kernel/rcu/tasks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h index acf81efe5eff..4dd70f2af4af 100644 --- a/kernel/rcu/tasks.h +++ b/kernel/rcu/tasks.h @@ -1552,7 +1552,7 @@ static int trc_inspect_reader(struct task_struct *t, void *bhp_in) } else { // The task is not running, so C-language access is safe. nesting = t->trc_reader_nesting; - WARN_ON_ONCE(ofl && task_curr(t) && !is_idle_task(t)); + WARN_ON_ONCE(ofl && task_curr(t) && (t != idle_task(task_cpu(t)))); if (IS_ENABLED(CONFIG_TASKS_TRACE_RCU_READ_MB) && ofl) n_heavy_reader_ofl_updates++; } -- 2.41.0