All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: linux-rt-users@vger.kernel.org
Cc: John Kacur <jkacur@redhat.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: [PATCH 4/5] cyclictest: Make trigger_lock a PI lock
Date: Wed, 26 Aug 2026 15:21:51 +0200	[thread overview]
Message-ID: <20260826132153.2476006-5-bigeasy@linutronix.de> (raw)
In-Reply-To: <20260826132153.2476006-1-bigeasy@linutronix.de>

trigger_lock is acquired by the timer thread. Given its usage it
probably makes no difference if it is PI or not but having it as PI will
keep the RV-monitor quiet so let's do it.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 src/cyclictest/cyclictest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 257b6f1b70cf6..1cad1bf6b929e 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -147,7 +147,7 @@ struct thread_stat {
 	unsigned long smi_count;
 };
 
-static pthread_mutex_t trigger_lock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t trigger_lock;
 
 static int trigger = 0;	/* Record spikes > trigger, 0 means don't record */
 static int trigger_list_size = 1024;	/* Number of list nodes */
@@ -1959,6 +1959,7 @@ int main(int argc, char **argv)
 	pthread_mutexattr_setprotocol(&mattr, PTHREAD_PRIO_INHERIT);
 	pthread_mutex_init(&refresh_on_max_lock, &mattr);
 	pthread_mutex_init(&break_thread_id_lock, &mattr);
+	pthread_mutex_init(&trigger_lock, &mattr);
 
 	/* lock all memory (prevent swapping) */
 	if (lockall)
-- 
2.55.0


  parent reply	other threads:[~2026-08-26 13:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26 13:21 [PATCH 0/5] cyclictest: Little tweaks here and there Sebastian Andrzej Siewior
2026-08-26 13:21 ` [PATCH 1/5] rt-tests: cyclicdeadline: Remove unused `alloverflows' Sebastian Andrzej Siewior
2026-08-31 16:40   ` John Kacur
2026-08-26 13:21 ` [PATCH 2/5] cyclictest: Acquire a lock before invoking pthread_cond_signal() Sebastian Andrzej Siewior
2026-08-31 16:41   ` John Kacur
2026-09-01  8:19   ` D, Suneeth
2026-09-01  8:34     ` Tomas Glozar
2026-09-01  8:39     ` Sebastian Andrzej Siewior
2026-08-26 13:21 ` [PATCH 3/5] cyclictest: Make break_thread_id_lock a PI lock Sebastian Andrzej Siewior
2026-08-31 16:42   ` John Kacur
2026-08-26 13:21 ` Sebastian Andrzej Siewior [this message]
2026-08-31 16:43   ` [PATCH 4/5] cyclictest: Make trigger_lock " John Kacur
2026-08-26 13:21 ` [PATCH 5/5] cyclictest: Add a timestamp of the last update Sebastian Andrzej Siewior
2026-08-28 14:26   ` John Kacur
2026-08-28 16:10     ` Sebastian Andrzej Siewior

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=20260826132153.2476006-5-bigeasy@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=jkacur@redhat.com \
    --cc=linux-rt-users@vger.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.