Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1893647lqa; Tue, 30 Apr 2024 02:20:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUebNzc0zeb5V/3NLA3cOSzgUihek1VO15OTP/qLi+OuaeBKv582Fjdh0cUBtkn9m+SXll61ACTVRXw35lsdj0nZn+8Hgl4FPvzkHgAKQ== X-Google-Smtp-Source: AGHT+IHAMMuKV22XF8z5mFvwrCRvCq6yzkYv+zRsIEGsmLhYYLys36QBb9wa1Ry+ydygs0r7Z13X X-Received: by 2002:a17:906:5f9a:b0:a58:ead7:6b8 with SMTP id a26-20020a1709065f9a00b00a58ead706b8mr5576588eju.66.1714468848945; Tue, 30 Apr 2024 02:20:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714468848; cv=pass; d=google.com; s=arc-20160816; b=zqDDM1+kplHCICQxCBbio6/4hgfLPiTnnGcz4Fh4gqPjnQisfAknQz7JTqKbintfuJ mgSnI7r12Z9isuJWiM7MBQIBOVSiSGWAul6WLm9SRiOoIhJJtW27YDFr/l5HMuUl2Sg2 doQUEiCvYoQ8atA8jM08UwjDqBM6RCJqjxMAIlVVkTXkRKTuCPwKVrSW3Hw4daArksWy 9KYC5MBjWz9cOt8i5FWVk9u47NhESJOietiCCVy0BF0+AGRBHYpJRmN+9tS89HfIcsaI CIyxZ8q4J2WQhC/xNKva59QUXn8lQxynj6R892irIWU5yHc8jPi1Lu1GpWvP/ZvGJBuN NfWg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=DV3lYzDfK9nBuWPjI96StBtQfZyWxLcHDIW5433jP/0=; fh=WzinSAfJjQwQsWhpsrf2fBMcmep3NnSwaYa0TI1U7L8=; b=S5AJCfDwv/ns7kEBFLAYpRfvG2A8CE0DTjfUTTAqOK7q9Nen77f+Kot49pXhjLDqd+ DLEZwffsfLoYFsDupw2uKSrU8gak4HkLFu3Oo06lGeZdWjjrFsrcoIpuZNoCKYRTddTC q395WXlxI2wvm1D3G/7aITDk+SWzy6PDXfae3Il9iLEFgu3zP6wO7ZhALdHmdfdfVOoH UYx5xCjUtWfXirFH0q2AO7Ykvpygh/HYVXO7fTgkAl65J4aDfQKEBa3JO+K6UiCBE/fB a5UlqgOPMl82rIc/7YT7Sc2s7ErOrr8jox2o+tuH8cqhe+T2alGNbnogPnBmCssqoE3M 7c/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GkzsLeey; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-163648-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163648-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d5-20020a170906174500b00a58ce28519bsi4830325eje.928.2024.04.30.02.20.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 02:20:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163648-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GkzsLeey; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-163648-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163648-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AA39B1F22E2D for ; Tue, 30 Apr 2024 09:20:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75CE519DF49; Tue, 30 Apr 2024 09:18:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GkzsLeey" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86BA9199E9B for ; Tue, 30 Apr 2024 09:18:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714468728; cv=none; b=JFHe7aK0+CuvXNThpOYZnfyChkVmy2+w/XsUwLg3eG4DEe28EE+mSV4xzl6P4fYcon2SpEDB4jxxQ6n35WVTMi8NS+h6QfZvFXy2XbYodE4P92qUeQbl5lxVYcXfAbaDkdLmkEfTCnY66QIM8pRYxYvGAhgMygFjoJGAgtRWUsM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714468728; c=relaxed/simple; bh=bgq56JkDmwg87xb07+GQV5RQnHvgbtHzqhdKAGeRZao=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B0EtrhQ/Go8srTWNqCAn5yUe4NqgTEN0K9amwc6Iz5imI7+IQQSZVEBHocv+Fy6pNiNlxbqFZeH+OrFKP3R81NO/cFbGUxkyDLT8C+qm7CYaJXP37OyUYlgepDw5wm1s9Y9NteLsjL5KnMPKuKcK0Z60zrXXk4e4FMBdKGYuao4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GkzsLeey; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714468725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DV3lYzDfK9nBuWPjI96StBtQfZyWxLcHDIW5433jP/0=; b=GkzsLeeyi9G/YBKp4Jc53MvTA3Gr+QgTHwekJYruI/JFJK6yAmOfZrdjOTNmz5WcwGAo7g usCYxu0gj3BnScvDcaPZMkOt5eXvSrPdxYkBaDRhq+Pe2MzaBGNCZ63oBO9h7gkjRzp0gR WVH2VGEITwfarxFHkCxJ6kMgyigxgBg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-231-JZg_Avr1PNe5rnf1IbGAyQ-1; Tue, 30 Apr 2024 05:18:40 -0400 X-MC-Unique: JZg_Avr1PNe5rnf1IbGAyQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 626B888E929; Tue, 30 Apr 2024 09:18:39 +0000 (UTC) Received: from vschneid-thinkpadt14sgen2i.remote.csb (unknown [10.39.193.247]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 48DFF492BC7; Tue, 30 Apr 2024 09:18:37 +0000 (UTC) From: Valentin Schneider To: rcu@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Frederic Weisbecker , "Paul E. McKenney" , Peter Zijlstra , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Zqiang Subject: [PATCH v2 12/27] context_tracking, rcu: Rename DYNTICK_IRQ_NONIDLE into CT_NESTING_IRQ_NONIDLE Date: Tue, 30 Apr 2024 11:17:16 +0200 Message-ID: <20240430091740.1826862-13-vschneid@redhat.com> In-Reply-To: <20240430091740.1826862-1-vschneid@redhat.com> References: <20240430091740.1826862-1-vschneid@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 The context_tracking.state RCU_DYNTICKS subvariable has been renamed to RCU_WATCHING, and the 'dynticks' prefix can be dropped without losing any meaning. Signed-off-by: Valentin Schneider --- include/linux/context_tracking_state.h | 2 +- kernel/context_tracking.c | 8 ++++---- kernel/rcu/tree.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h index 34fd504e53a86..0dbda59c9f372 100644 --- a/include/linux/context_tracking_state.h +++ b/include/linux/context_tracking_state.h @@ -7,7 +7,7 @@ #include /* Offset to allow distinguishing irq vs. task-based idle entry/exit. */ -#define DYNTICK_IRQ_NONIDLE ((LONG_MAX / 2) + 1) +#define CT_NESTING_IRQ_NONIDLE ((LONG_MAX / 2) + 1) enum ctx_state { CT_STATE_DISABLED = -1, /* returned by ct_state() if unknown */ diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c index 19e3e0e30a9b2..647939b0befd9 100644 --- a/kernel/context_tracking.c +++ b/kernel/context_tracking.c @@ -29,7 +29,7 @@ DEFINE_PER_CPU(struct context_tracking, context_tracking) = { #ifdef CONFIG_CONTEXT_TRACKING_IDLE .nesting = 1, - .nmi_nesting = DYNTICK_IRQ_NONIDLE, + .nmi_nesting = CT_NESTING_IRQ_NONIDLE, #endif .state = ATOMIC_INIT(CT_RCU_WATCHING), }; @@ -125,7 +125,7 @@ static void noinstr ct_kernel_exit(bool user, int offset) { struct context_tracking *ct = this_cpu_ptr(&context_tracking); - WARN_ON_ONCE(ct_nmi_nesting() != DYNTICK_IRQ_NONIDLE); + WARN_ON_ONCE(ct_nmi_nesting() != CT_NESTING_IRQ_NONIDLE); WRITE_ONCE(ct->nmi_nesting, 0); WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) && ct_nesting() == 0); @@ -156,7 +156,7 @@ static void noinstr ct_kernel_exit(bool user, int offset) * Exit an RCU extended quiescent state, which can be either the * idle loop or adaptive-tickless usermode execution. * - * We crowbar the ->nmi_nesting field to DYNTICK_IRQ_NONIDLE to + * We crowbar the ->nmi_nesting field to CT_NESTING_IRQ_NONIDLE to * allow for the possibility of usermode upcalls messing up our count of * interrupt nesting level during the busy period that is just now starting. */ @@ -186,7 +186,7 @@ static void noinstr ct_kernel_enter(bool user, int offset) WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) && !user && !is_idle_task(current)); WRITE_ONCE(ct->nesting, 1); WARN_ON_ONCE(ct_nmi_nesting()); - WRITE_ONCE(ct->nmi_nesting, DYNTICK_IRQ_NONIDLE); + WRITE_ONCE(ct->nmi_nesting, CT_NESTING_IRQ_NONIDLE); instrumentation_end(); } diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index f5b1d83cdef85..d8f89bc573448 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -598,7 +598,7 @@ void rcu_irq_exit_check_preempt(void) RCU_LOCKDEP_WARN(ct_nesting() <= 0, "RCU nesting counter underflow/zero!"); RCU_LOCKDEP_WARN(ct_nmi_nesting() != - DYNTICK_IRQ_NONIDLE, + CT_NESTING_IRQ_NONIDLE, "Bad RCU nmi_nesting counter\n"); RCU_LOCKDEP_WARN(rcu_dynticks_curr_cpu_in_eqs(), "RCU in extended quiescent state!"); -- 2.43.0