All of lore.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot2 for Marco Elver" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Marco Elver <elver@google.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Dmitry Vyukov <dvyukov@google.com>,
	Ian Rogers <irogers@google.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: perf/core] perf/hw_breakpoint: Mark data __ro_after_init
Date: Thu, 01 Sep 2022 08:12:49 -0000	[thread overview]
Message-ID: <166201996923.401.194772760546834930.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220829124719.675715-6-elver@google.com>

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     db5f6f853194c5e02d8551425b5e86b7e0b81806
Gitweb:        https://git.kernel.org/tip/db5f6f853194c5e02d8551425b5e86b7e0b81806
Author:        Marco Elver <elver@google.com>
AuthorDate:    Mon, 29 Aug 2022 14:47:10 +02:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Tue, 30 Aug 2022 10:56:21 +02:00

perf/hw_breakpoint: Mark data __ro_after_init

Mark read-only data after initialization as __ro_after_init.

While we are here, turn 'constraints_initialized' into a bool.

Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Acked-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20220829124719.675715-6-elver@google.com
---
 kernel/events/hw_breakpoint.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c
index 6d09edc..7df46b2 100644
--- a/kernel/events/hw_breakpoint.c
+++ b/kernel/events/hw_breakpoint.c
@@ -46,7 +46,7 @@ struct bp_cpuinfo {
 };
 
 static DEFINE_PER_CPU(struct bp_cpuinfo, bp_cpuinfo[TYPE_MAX]);
-static int nr_slots[TYPE_MAX];
+static int nr_slots[TYPE_MAX] __ro_after_init;
 
 static struct bp_cpuinfo *get_bp_info(int cpu, enum bp_type_idx type)
 {
@@ -62,7 +62,7 @@ static const struct rhashtable_params task_bps_ht_params = {
 	.automatic_shrinking = true,
 };
 
-static int constraints_initialized;
+static bool constraints_initialized __ro_after_init;
 
 /* Gather the number of total pinned and un-pinned bp in a cpuset */
 struct bp_busy_slots {
@@ -739,7 +739,7 @@ int __init init_hw_breakpoint(void)
 	if (ret)
 		goto err;
 
-	constraints_initialized = 1;
+	constraints_initialized = true;
 
 	perf_pmu_register(&perf_breakpoint, "breakpoint", PERF_TYPE_BREAKPOINT);
 

  reply	other threads:[~2022-09-01  8:14 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29 12:47 [PATCH v4 00/14] perf/hw_breakpoint: Optimize for thousands of tasks Marco Elver
2022-08-29 12:47 ` Marco Elver
2022-08-29 12:47 ` [PATCH v4 01/14] perf/hw_breakpoint: Add KUnit test for constraints accounting Marco Elver
2022-08-29 12:47   ` Marco Elver
2022-09-01  8:12   ` [tip: perf/core] " tip-bot2 for Marco Elver
2022-08-29 12:47 ` [PATCH v4 02/14] perf/hw_breakpoint: Provide hw_breakpoint_is_used() and use in test Marco Elver
2022-08-29 12:47   ` Marco Elver
2022-09-01  8:12   ` [tip: perf/core] " tip-bot2 for Marco Elver
2022-08-29 12:47 ` [PATCH v4 03/14] perf/hw_breakpoint: Clean up headers Marco Elver
2022-08-29 12:47   ` Marco Elver
2022-09-01  8:12   ` [tip: perf/core] " tip-bot2 for Marco Elver
2022-08-29 12:47 ` [PATCH v4 04/14] perf/hw_breakpoint: Optimize list of per-task breakpoints Marco Elver
2022-08-29 12:47   ` Marco Elver
2022-09-01  8:12   ` [tip: perf/core] " tip-bot2 for Marco Elver
2022-08-29 12:47 ` [PATCH v4 05/14] perf/hw_breakpoint: Mark data __ro_after_init Marco Elver
2022-08-29 12:47   ` Marco Elver
2022-09-01  8:12   ` tip-bot2 for Marco Elver [this message]
2022-08-29 12:47 ` [PATCH v4 06/14] perf/hw_breakpoint: Optimize constant number of breakpoint slots Marco Elver
2022-08-29 12:47   ` Marco Elver
2022-09-01  8:12   ` [tip: perf/core] " tip-bot2 for Marco Elver
2022-08-29 12:47 ` [PATCH v4 07/14] perf/hw_breakpoint: Make hw_breakpoint_weight() inlinable Marco Elver
2022-08-29 12:47   ` Marco Elver
2022-09-01  8:12   ` [tip: perf/core] " tip-bot2 for Marco Elver
2022-08-29 12:47 ` [PATCH v4 08/14] perf/hw_breakpoint: Remove useless code related to flexible breakpoints Marco Elver
2022-08-29 12:47   ` Marco Elver
2022-09-01  8:12   ` [tip: perf/core] " tip-bot2 for Marco Elver
2022-08-29 12:47 ` [PATCH v4 09/14] powerpc/hw_breakpoint: Avoid relying on caller synchronization Marco Elver
2022-08-29 12:47   ` Marco Elver
2022-09-01  8:12   ` [tip: perf/core] " tip-bot2 for Marco Elver
2022-08-29 12:47 ` [PATCH v4 10/14] locking/percpu-rwsem: Add percpu_is_write_locked() and percpu_is_read_locked() Marco Elver
2022-08-29 12:47   ` Marco Elver
2022-09-01  8:12   ` [tip: perf/core] " tip-bot2 for Marco Elver
2022-08-29 12:47 ` [PATCH v4 11/14] perf/hw_breakpoint: Reduce contention with large number of tasks Marco Elver
2022-08-29 12:47   ` Marco Elver
2022-09-01  8:12   ` [tip: perf/core] " tip-bot2 for Marco Elver
2022-08-29 12:47 ` [PATCH v4 12/14] perf/hw_breakpoint: Introduce bp_slots_histogram Marco Elver
2022-08-29 12:47   ` Marco Elver
2022-09-01  8:12   ` [tip: perf/core] " tip-bot2 for Marco Elver
2022-08-29 12:47 ` [PATCH v4 13/14] perf/hw_breakpoint: Optimize max_bp_pinned_slots() for CPU-independent task targets Marco Elver
2022-08-29 12:47   ` Marco Elver
2022-09-01  8:12   ` [tip: perf/core] " tip-bot2 for Marco Elver
2022-08-29 12:47 ` [PATCH v4 14/14] perf/hw_breakpoint: Optimize toggle_bp_slot() " Marco Elver
2022-08-29 12:47   ` Marco Elver
2022-09-01  8:12   ` [tip: perf/core] " tip-bot2 for Marco Elver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=166201996923.401.194772760546834930.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.