Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1893093lqa; Tue, 30 Apr 2024 02:19:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXohpXPpsf9Owfmb1w1bn9m0CiV9fMrcopm5XadcwrPEPFVIff2jYvuPsr5FqyVDI9t5fX8F9BSvysMaVp1G3gyYJvsZ0Av0IAujz1czA== X-Google-Smtp-Source: AGHT+IG5U9H+H5g04i06gtDPWR+Huc5qCpONaNiEvO9js8WkL7wvHtF3rIoKyM2sUORIOkpHr1p8 X-Received: by 2002:a05:6870:b686:b0:22e:d572:271b with SMTP id cy6-20020a056870b68600b0022ed572271bmr13218441oab.58.1714468770665; Tue, 30 Apr 2024 02:19:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714468770; cv=pass; d=google.com; s=arc-20160816; b=zPOJe5mooMtzKhVI8/KcmF56UrYUNzQ0tf2QsxgyohBj4jhlUeJLUF7eVczW5m6ulr CaoUeFARhXTmTheGhY5M1x5AypTS0393QGvSN0U/kHl9XRlj9wHulFPANUfWZvbdTiMQ zqTbs5jwI5PrU/efnFHnJC4C+9SBur+0WsoJ+JfV3Ife9YO4lRdj/NNDPA2ya986Pr1s +AO3QFQx4yvr4r9f3jcSL2M8R9gFkyxrNwvJ6DsKH2JntwNT0iBf0ybSNhJTFyunAv1N rY56mOq2agJ6OhbgVb/PeBHFMHQgUBEWL9JGUgoHy4272KWslY6fefhIW4BkAlNMBO2U FSRg== 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=CFlTn+/v8IRwxqNngHBcNmTXrKR+6D0bXWHVkn7P2Ec=; fh=WzinSAfJjQwQsWhpsrf2fBMcmep3NnSwaYa0TI1U7L8=; b=U99YcGjqby8t9fLFCJRrA5Q2E04jhi6qJE4e4s4WvnSdRRXkU14eDteNc7f7H0NG9F IZYzqH2egOpvdK1DpMShnljYYsj0wherSBdlIxgheld0DBhJrYTtzw2PoxjpyZmMEKEn 8/6iOez3svG8DFp/UCEvNAm6vVz7XKpoXNQk7hka9xiIPqt6dy3AE55oHyuwYRp9NQjn s7L0fWf2ISOHia2xF70gnnEcvfsJkM6qcxBQAxB4Dk3ASKKjeZNmwkRc7gt569m3hH2u qLNR6/112MyqP28Goq5u1fmGa4nciDbVZqcIHJgbqusSyzGHCo4aKB/g4+M/d7c+nB10 NhnA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=J0OHf3C1; 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-163640-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163640-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 10-20020a056a00070a00b006ecf39181e5si21011933pfl.352.2024.04.30.02.19.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 02:19:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163640-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=J0OHf3C1; 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-163640-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163640-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C4B9D2855E7 for ; Tue, 30 Apr 2024 09:18:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75D09129A90; Tue, 30 Apr 2024 09:18:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="J0OHf3C1" 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 C3C051292FF for ; Tue, 30 Apr 2024 09:18:21 +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=1714468703; cv=none; b=HONSyfl+UYc9ju3gEzEsVe/qKBTyQMl1ufta9smLLqN+5WJiiWxqAkgb6g5uO5smcNwWb4LDWyF4x6cwhqus8dKYFEdfDywzJYI1XKgmg5zVeKs/V/CDi69AUNnzCts50lJPP18fiZMfZMtVSK6aZV4TwegXHZS1udM4Ui8zZW8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714468703; c=relaxed/simple; bh=6W21K9eH/6kGr4UiCCz78lCh/I3jLdLhvQ6VLuSlWqA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JVyscIGNDR/jsg7DjY1Ngpik9HRBwQZg7uQavW513UzMs9DOHLbLaGcoYb3tp0wP9gnfYqPR3X7d2xw3ohU2oX1MjNV1/6pFjBWQoDosDxA8JMpOSA8rRwG/925pv1Xts0hZFZr0b1rvkYV3aqRiyKy4BNadUBb11u6oWr1RgeQ= 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=J0OHf3C1; 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=1714468700; 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=CFlTn+/v8IRwxqNngHBcNmTXrKR+6D0bXWHVkn7P2Ec=; b=J0OHf3C1MSb9MUu4cpoUy/xevgDKX3drMcqf/M3tY84E+fEUvlfwfqYsaC/pdgx9RRzxgu xXTIc/jSAn8Xtz2wG+4ApiiFWYoVA0yd3SIEpGiVaRXnwGD3cswMYBIgf7GuBjcTM9eqyB Psho5NvBV+wi33lZe9GolEhplMj+Vhw= 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-375-JIKxblCvOUC1R3xYbu7TSg-1; Tue, 30 Apr 2024 05:18:15 -0400 X-MC-Unique: JIKxblCvOUC1R3xYbu7TSg-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 DE1BC100ADE3; Tue, 30 Apr 2024 09:18:14 +0000 (UTC) Received: from vschneid-thinkpadt14sgen2i.remote.csb (unknown [10.39.193.247]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D22D140ED37; Tue, 30 Apr 2024 09:18:12 +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 03/27] context_tracking, rcu: Rename ct_dynticks() into ct_rcu_watching() Date: Tue, 30 Apr 2024 11:17:07 +0200 Message-ID: <20240430091740.1826862-4-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, reflect that change in the related helpers. Signed-off-by: Valentin Schneider --- include/linux/context_tracking_state.h | 2 +- kernel/context_tracking.c | 10 +++++----- kernel/rcu/tree.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h index 94d6a935af3be..cb90d8c178104 100644 --- a/include/linux/context_tracking_state.h +++ b/include/linux/context_tracking_state.h @@ -56,7 +56,7 @@ static __always_inline int __ct_state(void) #endif #ifdef CONFIG_CONTEXT_TRACKING_IDLE -static __always_inline int ct_dynticks(void) +static __always_inline int ct_rcu_watching(void) { return atomic_read(this_cpu_ptr(&context_tracking.state)) & CT_RCU_WATCHING_MASK; } diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c index 9f009de83cc8e..738a9ff4f1f51 100644 --- a/kernel/context_tracking.c +++ b/kernel/context_tracking.c @@ -137,7 +137,7 @@ static void noinstr ct_kernel_exit(bool user, int offset) instrumentation_begin(); lockdep_assert_irqs_disabled(); - trace_rcu_dyntick(TPS("Start"), ct_dynticks_nesting(), 0, ct_dynticks()); + trace_rcu_dyntick(TPS("Start"), ct_dynticks_nesting(), 0, ct_rcu_watching()); WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) && !user && !is_idle_task(current)); rcu_preempt_deferred_qs(current); @@ -182,7 +182,7 @@ static void noinstr ct_kernel_enter(bool user, int offset) // instrumentation for the noinstr ct_kernel_enter_state() instrument_atomic_write(&ct->state, sizeof(ct->state)); - trace_rcu_dyntick(TPS("End"), ct_dynticks_nesting(), 1, ct_dynticks()); + trace_rcu_dyntick(TPS("End"), ct_dynticks_nesting(), 1, ct_rcu_watching()); WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) && !user && !is_idle_task(current)); WRITE_ONCE(ct->dynticks_nesting, 1); WARN_ON_ONCE(ct_dynticks_nmi_nesting()); @@ -220,7 +220,7 @@ void noinstr ct_nmi_exit(void) */ if (ct_dynticks_nmi_nesting() != 1) { trace_rcu_dyntick(TPS("--="), ct_dynticks_nmi_nesting(), ct_dynticks_nmi_nesting() - 2, - ct_dynticks()); + ct_rcu_watching()); WRITE_ONCE(ct->dynticks_nmi_nesting, /* No store tearing. */ ct_dynticks_nmi_nesting() - 2); instrumentation_end(); @@ -228,7 +228,7 @@ void noinstr ct_nmi_exit(void) } /* This NMI interrupted an RCU-idle CPU, restore RCU-idleness. */ - trace_rcu_dyntick(TPS("Startirq"), ct_dynticks_nmi_nesting(), 0, ct_dynticks()); + trace_rcu_dyntick(TPS("Startirq"), ct_dynticks_nmi_nesting(), 0, ct_rcu_watching()); WRITE_ONCE(ct->dynticks_nmi_nesting, 0); /* Avoid store tearing. */ // instrumentation for the noinstr ct_kernel_exit_state() @@ -296,7 +296,7 @@ void noinstr ct_nmi_enter(void) trace_rcu_dyntick(incby == 1 ? TPS("Endirq") : TPS("++="), ct_dynticks_nmi_nesting(), - ct_dynticks_nmi_nesting() + incby, ct_dynticks()); + ct_dynticks_nmi_nesting() + incby, ct_rcu_watching()); instrumentation_end(); WRITE_ONCE(ct->dynticks_nmi_nesting, /* Prevent store tearing. */ ct_dynticks_nmi_nesting() + incby); diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 84befc91799a3..db64f092428dd 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -291,7 +291,7 @@ void rcu_softirq_qs(void) */ static void rcu_dynticks_eqs_online(void) { - if (ct_dynticks() & CT_RCU_WATCHING) + if (ct_rcu_watching() & CT_RCU_WATCHING) return; ct_state_inc(CT_RCU_WATCHING); } -- 2.43.0