public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] rcutorture: Allow a negative value for nfakewriters
@ 2025-01-23 18:58 Uladzislau Rezki (Sony)
  2025-01-23 18:58 ` [PATCH 2/4] torture: Remove CONFIG_NR_CPUS configuration Uladzislau Rezki (Sony)
                   ` (3 more replies)
  0 siblings, 4 replies; 32+ messages in thread
From: Uladzislau Rezki (Sony) @ 2025-01-23 18:58 UTC (permalink / raw)
  To: Paul E . McKenney, Boqun Feng
  Cc: RCU, LKML, Frederic Weisbecker, Cheung Wall, Neeraj upadhyay,
	Joel Fernandes, Uladzislau Rezki, Oleksiy Avramchenko

Currently "nfakewriters" parameter can be set to any value but
there is no possibility to adjust it automatically based on how
many CPUs a system has where a test is run on.

To address this, if the "nfakewriters" is set to negative it will
be adjusted to num_possible_cpus() during torture initialization.

Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
---
 kernel/rcu/rcutorture.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index d26fb1d33ed9..6bc161e1e8ac 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -4050,6 +4050,10 @@ rcu_torture_init(void)
 					  writer_task);
 	if (torture_init_error(firsterr))
 		goto unwind;
+
+	if (nfakewriters < 0)
+		nfakewriters = (int) num_possible_cpus();
+
 	if (nfakewriters > 0) {
 		fakewriter_tasks = kcalloc(nfakewriters,
 					   sizeof(fakewriter_tasks[0]),
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2025-01-28 21:19 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-23 18:58 [PATCH 1/4] rcutorture: Allow a negative value for nfakewriters Uladzislau Rezki (Sony)
2025-01-23 18:58 ` [PATCH 2/4] torture: Remove CONFIG_NR_CPUS configuration Uladzislau Rezki (Sony)
2025-01-23 20:29   ` Paul E. McKenney
2025-01-24 11:41     ` Uladzislau Rezki
2025-01-24 15:45       ` Paul E. McKenney
2025-01-24 17:21         ` Uladzislau Rezki
2025-01-24 17:36           ` Paul E. McKenney
2025-01-24 17:48             ` Uladzislau Rezki
2025-01-24 19:34               ` Paul E. McKenney
2025-01-27 13:27                 ` Uladzislau Rezki
2025-01-27 14:51                   ` Paul E. McKenney
2025-01-27 15:42                     ` Uladzislau Rezki
2025-01-27 16:51                       ` Paul E. McKenney
2025-01-27 17:26                         ` Uladzislau Rezki
2025-01-27 18:15                           ` Paul E. McKenney
2025-01-27 18:31                             ` Uladzislau Rezki
2025-01-27 19:24                             ` Uladzislau Rezki
2025-01-27 20:37                               ` Uladzislau Rezki
2025-01-28  0:14                                 ` Paul E. McKenney
2025-01-28 12:17                                   ` Uladzislau Rezki
2025-01-28 12:41                                     ` Paul E. McKenney
2025-01-28 14:34                                       ` Uladzislau Rezki
2025-01-28 18:43                                         ` Paul E. McKenney
2025-01-28 20:57                                           ` Uladzislau Rezki
2025-01-23 18:58 ` [PATCH 3/4] rcu: Update TREE05.boot to test normal synchronize_rcu() Uladzislau Rezki (Sony)
2025-01-23 20:30   ` Paul E. McKenney
2025-01-23 18:58 ` [PATCH 4/4] rcu: Use _full() API to debug synchronize_rcu() Uladzislau Rezki (Sony)
2025-01-23 21:52   ` Paul E. McKenney
2025-01-24 11:48     ` Uladzislau Rezki
2025-01-24 15:49       ` Paul E. McKenney
2025-01-28 20:55 ` [PATCH 1/4] rcutorture: Allow a negative value for nfakewriters Uladzislau Rezki
2025-01-28 21:19   ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox