Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2387324imw; Sun, 17 Jul 2022 07:44:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sNO9zF+UnikrpW+jHci2+MK/deuBDBISDmnk+0cNcJMbB7aUBexBQwSuGiKrQ8f3/7RCVi X-Received: by 2002:a17:90a:9d8a:b0:1ef:7a8d:1808 with SMTP id k10-20020a17090a9d8a00b001ef7a8d1808mr33865273pjp.135.1658069094593; Sun, 17 Jul 2022 07:44:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658069094; cv=none; d=google.com; s=arc-20160816; b=0mVFi62ue/yBv6O2itrdkmgq9TpCoPfj/zqatvOrLCy+fUWnucF7bmDQa5b+RSLGMA 1db+vCTCDdns4GZHgkgRnY1/dDjfyPbofAQ906Gq63ty8UFA6Oe2TuiVQVHAuZS7w27e TkfEskH/AeaUzQwBCyiU/eQr6k2kIyb9YSzXMfR5888I8a3c5bj/MPa1Wdq8B9kPfuFQ +luMV+xqZwR0n5kdSk1dB51zbvWJq3Mp2IqnhwRtpkO+h/153pZNQUDfJuwHoK2SqsNk u2BrLjytbr4YGOKcnwhi3T4Vaq5qmzkdigKu+gdaBCRLI/xok4nLcf1T1XBuPfXNbtBP 3tHQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=8iL3HDzOcta24G13DxTOpaBAl8nmUbHnqgRJN+q0lJE=; b=uknV7ols634DJ5X9Nqz00pTCl4p1xKisAb4eDfO+rtZO7cPFR6OWGheKibqjf6ZQoZ C1ozOcYIz2oSfUPaIYfIM4EpLO89h/G6LH+hvziKqBSU3vZjMw65q+iip8wrdxrsgLLO wQy/xUT07PaTRSm7UTxob9ROX3O0SfY1UImJ1212k/bhlfkNrHSkWo7UqImY/81El1uG O9nWWT4lXYscD/5htathG0orTfm0sMNWUT94zss4fqnJIw1M2CLec1aXTSyx03fYYDAU j+p/1uMdu4nbbYs9ntAJjYNdW43cx0QJ+0jbRMLZbxWVd08c3tWLmSyvA+fGayaybOOR aIDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eXtUthGx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pc18-20020a17090b3b9200b001ed37b0be62si13718019pjb.90.2022.07.17.07.44.40; Sun, 17 Jul 2022 07:44:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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; dkim=pass header.i=@intel.com header.s=Intel header.b=eXtUthGx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232250AbiGQOdM (ORCPT + 99 others); Sun, 17 Jul 2022 10:33:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbiGQOdK (ORCPT ); Sun, 17 Jul 2022 10:33:10 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40A0D15814; Sun, 17 Jul 2022 07:33:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658068389; x=1689604389; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=x3vifSfYKYciuNC9kpnllNYzaEXNsYZUcjc3GTcyvHU=; b=eXtUthGx0dAPEO4NxB7aiOWKXAOsfhUh14o/jlQn6QSlv+S5GRRVQDsX TYA9y7Q7LOFFl+3qx9FYE9RySsw4SlTZ6CsWfztnU5qa6xKzFnMnq23Tx 677Vs8m7KaPkuy8SuVw7tES2Jga8oAO5EkCWsAAJ2PY92JhGoiasaiA6s QGP8yjicF/4PlGFFoof2nzTYkVcQu6rw/YSpc3Z9rSlSXEviTNV7bH6Re 1x1iuuS5fUcF4Ug/lHpZYfvrGkI+IcgjSjyBcZGsZ9fmQJKqk36zagB1M WZnXzGlYp8THiMz4jXFiiUa+7JoaNBYIgCCMFJgVankAgEhpaW+KziuYz g==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="265851423" X-IronPort-AV: E=Sophos;i="5.92,279,1650956400"; d="scan'208";a="265851423" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 07:33:08 -0700 X-IronPort-AV: E=Sophos;i="5.92,279,1650956400"; d="scan'208";a="654951133" Received: from zq-optiplex-7090.bj.intel.com ([10.238.156.125]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 07:33:07 -0700 From: Zqiang To: paulmck@kernel.org, frederic@kernel.org, quic_neeraju@quicinc.com, joel@joelfernandes.org Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rcu-tasks: Make RCU Tasks Trace checking for userspace execution Date: Sun, 17 Jul 2022 22:38:01 +0800 Message-Id: <20220717143801.189865-1-qiang1.zhang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE 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-kernel@vger.kernel.org For RCU tasks trace, the userspace execution is also a valid quiescent state, if the task is in userspace, the ->trc_reader_nesting should be zero and if the ->trc_reader_special.b.need_qs is not set, set the tasks ->trc_reader_special.b.need_qs is TRC_NEED_QS_CHECKED, this cause grace-period kthread remove it from holdout list if it remains here. This commit add rcu_tasks_trace_qs() to rcu_flavor_sched_clock_irq() when the kernel built with no PREEMPT_RCU. Signed-off-by: Zqiang --- kernel/rcu/tree_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 4152816dd29f..764cc4db4134 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -976,7 +976,7 @@ static void rcu_flavor_sched_clock_irq(int user) * neither access nor modify, at least not while the * corresponding CPU is online. */ - + rcu_tasks_trace_qs(current); rcu_qs(); } } -- 2.25.1