Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1894842lqa; Tue, 30 Apr 2024 02:24:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWTOQHo+ggygNSMnKoZZ9jB9dSyMHBEbo0G/GUkC2ijfESZ8GDEKHdg5bQVK9bokJnhSjJLCY3vth03CLHeZMR6TNIMsHq75v8XFjVyww== X-Google-Smtp-Source: AGHT+IGB2ou6Xrc07Nq3xDlYQENp0v8n7wio69FVEAnP0D2EkFIRUfpsAfFDjKg0WOllLFslk8cz X-Received: by 2002:ac8:57d1:0:b0:43a:be0b:4761 with SMTP id w17-20020ac857d1000000b0043abe0b4761mr8461274qta.1.1714469039968; Tue, 30 Apr 2024 02:23:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714469039; cv=pass; d=google.com; s=arc-20160816; b=wBMeMKn8dx8K0lE/Fe1o3Aq23g1zrQ6S/BzHxDrr4kwpTxVf/UV60cu59LGnmodTs4 kRB96xp2AYTeyuCWce5QaZV5WKjSpsy6wvLdVrV3HxiEnyP0UgoXLtJ/V05Bb8v6t2mf R68vWOd/Mrvd3LQNAkSSwxmzQiOsLmme6hwCorURnzDoAfp+JK3nnMrjntyTtz3YiWzb BCVhY6jGjDo9JgXXcU7ZcCea0rRTQw2RSl+4AWOknYoJKY7iVsJ7+egxvI1NQrMWMOgv mGw4/yD8Y8qsw22z3woCOE+e0+OtgGaRRx7UNC0mT1DziTjg2S62A1RQqoU+fXm4mu2Y oPWA== 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=jFwfWtoBEea+wl4lNZJkfIY1AL564duSUyUuZY/5YOk=; fh=WzinSAfJjQwQsWhpsrf2fBMcmep3NnSwaYa0TI1U7L8=; b=i0EtZTTjG50jyDNAQbI9Ey58cXxAyiXhnG5ugrZwRr6NpJhiIlCsqP1xdTmYkhiEZn ujSl7AyjswBnoxm9U4wgQPJkC563PKh7aTtqXAEXxiapcOPyqHm7G9MlG9nCbmlSmZoG 7ugQMoH/ckDHvRBq6Jql+Ow7F93fbD8sjBhilHWwhwbq8FLtQ8RR69ytR08tTN3YU1l5 vnoYKdtPz0jDw8qJoGcK8gI6uJS9LaV3ugQtNwK7oYTdcliQtd4RPJgdrR1bIESfgqGX NfklCCNrfju3IRDxCaijm6KYLmZvQbgISwJtHtJKczMLUaWFn7BBwRiNFVzlkoBspHOW n2Pw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Hmw+/hZv"; 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-163663-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163663-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f31-20020a05622a1a1f00b0043ac04e697asi6058906qtb.727.2024.04.30.02.23.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 02:23:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163663-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Hmw+/hZv"; 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-163663-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163663-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id AD2C31C22191 for ; Tue, 30 Apr 2024 09:23:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88A211C65EF; Tue, 30 Apr 2024 09:19:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Hmw+/hZv" 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 4ACD8129E7A for ; Tue, 30 Apr 2024 09:19:09 +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=1714468750; cv=none; b=nus1F9FPjvOVHIxBeA5+CoOEFormi9uGIJg8nPeGS25UNickq8E1WynLIJu8dA+f3/9ES1DMMY9EqgxWZvFW8qTsjeoDmNYAsh5pBN90GR1ayvWf2pw/ToBgHtNL0C26ncwLrn1u5OCY/BCICKCDwLthF9vgpxCJKBhIdyTpb2w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714468750; c=relaxed/simple; bh=fBp/NmsaAPYn3Q9LmEeHWCL4r9VZ/lDm41uN7wZ/n7E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rjHV6Pw7ke4FXmUOkVNpZGBEBFhQD7N/AlMoIBKGA/91RV2+JllrSlPurt5U5actvl9kdS04LE3fPejj3l6XvuQgXkbRMHDnQxPA1Wnd+RunuazjQ9dXRqNk3eBqjsb6wDG/G+m5AktTqUOEZVSrVbwBnbAdSy9Xd729HsI835Q= 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=Hmw+/hZv; 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=1714468748; 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=jFwfWtoBEea+wl4lNZJkfIY1AL564duSUyUuZY/5YOk=; b=Hmw+/hZvuKqG2X+RFQ2sumKBpiJi2HKCkrs7E2Qvmo8p/EkIP9+Le9G+jnfYY+XP/b7cki QcsoLP6Ddz4NLllAHPf+XF31N30Tt9XwMEAdgeUiRsdri8Ea6Fz/d00M1Xqh8YTZe0ITFp P06XvPKzsYxNKpGAeCMS7CcIFE6NxcI= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-627-FFE2xNfqMduNtc734sLPnw-1; Tue, 30 Apr 2024 05:19:03 -0400 X-MC-Unique: FFE2xNfqMduNtc734sLPnw-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 0CD691C0AF43; Tue, 30 Apr 2024 09:19:03 +0000 (UTC) Received: from vschneid-thinkpadt14sgen2i.remote.csb (unknown [10.39.193.247]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6BC88492BC7; Tue, 30 Apr 2024 09:19:00 +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 20/27] rcu: Rename struct rcu_data .dynticks_snap into .watching_snap Date: Tue, 30 Apr 2024 11:17:24 +0200 Message-ID: <20240430091740.1826862-21-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 snapshot helpers are now prefix by "rcu_watching". Reflect that change into the storage variables for these snapshots. Signed-off-by: Valentin Schneider --- .../RCU/Design/Data-Structures/Data-Structures.rst | 4 ++-- kernel/rcu/tree.c | 6 +++--- kernel/rcu/tree.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/RCU/Design/Data-Structures/Data-Structures.rst b/Documentation/RCU/Design/Data-Structures/Data-Structures.rst index 5389cc49bea13..de76c624fe93e 100644 --- a/Documentation/RCU/Design/Data-Structures/Data-Structures.rst +++ b/Documentation/RCU/Design/Data-Structures/Data-Structures.rst @@ -921,10 +921,10 @@ This portion of the ``rcu_data`` structure is declared as follows: :: - 1 int dynticks_snap; + 1 int watching_snap; 2 unsigned long dynticks_fqs; -The ``->dynticks_snap`` field is used to take a snapshot of the +The ``->watching_snap`` field is used to take a snapshot of the corresponding CPU's dyntick-idle state when forcing quiescent states, and is therefore accessed from other CPUs. Finally, the ``->dynticks_fqs`` field is used to count the number of times this CPU diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index d3f3a049904fc..73b95240a1a6c 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -770,8 +770,8 @@ static void rcu_gpnum_ovf(struct rcu_node *rnp, struct rcu_data *rdp) */ static int dyntick_save_progress_counter(struct rcu_data *rdp) { - rdp->dynticks_snap = rcu_watching_snap(rdp->cpu); - if (rcu_watching_in_eqs(rdp->dynticks_snap)) { + rdp->watching_snap = rcu_watching_snap(rdp->cpu); + if (rcu_watching_in_eqs(rdp->watching_snap)) { trace_rcu_fqs(rcu_state.name, rdp->gp_seq, rdp->cpu, TPS("dti")); rcu_gpnum_ovf(rdp->mynode, rdp); return 1; @@ -803,7 +803,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp) * read-side critical section that started before the beginning * of the current RCU grace period. */ - if (rcu_watching_changed_since(rdp, rdp->dynticks_snap)) { + if (rcu_watching_changed_since(rdp, rdp->watching_snap)) { trace_rcu_fqs(rcu_state.name, rdp->gp_seq, rdp->cpu, TPS("dti")); rcu_gpnum_ovf(rnp, rdp); return 1; diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h index affcb92a358c3..ac153e365355d 100644 --- a/kernel/rcu/tree.h +++ b/kernel/rcu/tree.h @@ -206,7 +206,7 @@ struct rcu_data { long blimit; /* Upper limit on a processed batch */ /* 3) dynticks interface. */ - int dynticks_snap; /* Per-GP tracking for dynticks. */ + int watching_snap; /* Per-GP tracking for dynticks. */ bool rcu_need_heavy_qs; /* GP old, so heavy quiescent state! */ bool rcu_urgent_qs; /* GP old need light quiescent state. */ bool rcu_forced_tick; /* Forced tick to provide QS. */ -- 2.43.0