linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] rcuscale: add kfree_rcu() single-argument scale test
@ 2021-01-29 20:05 Uladzislau Rezki (Sony)
  2021-01-29 20:05 ` [PATCH 2/2] kvfree_rcu: Use same set of flags as for single-argument Uladzislau Rezki (Sony)
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Uladzislau Rezki (Sony) @ 2021-01-29 20:05 UTC (permalink / raw)
  To: LKML, RCU, Paul E . McKenney, Michael Ellerman
  Cc: Michal Hocko, Andrew Morton, Daniel Axtens, Frederic Weisbecker,
	Neeraj Upadhyay, Joel Fernandes, Peter Zijlstra, Thomas Gleixner,
	Theodore Y . Ts'o, Sebastian Andrzej Siewior,
	Uladzislau Rezki, Oleksiy Avramchenko

To stress and test a single argument of kfree_rcu() call, we
should to have a special coverage for it. We used to have it
in the test-suite related to vmalloc stressing. The reason is
the rcuscale is a correct place for RCU related things.

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

diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c
index 06491d5530db..e17745a155f9 100644
--- a/kernel/rcu/rcuscale.c
+++ b/kernel/rcu/rcuscale.c
@@ -94,6 +94,7 @@ torture_param(bool, shutdown, RCUSCALE_SHUTDOWN,
 torture_param(int, verbose, 1, "Enable verbose debugging printk()s");
 torture_param(int, writer_holdoff, 0, "Holdoff (us) between GPs, zero to disable");
 torture_param(int, kfree_rcu_test, 0, "Do we run a kfree_rcu() scale test?");
+torture_param(int, kfree_rcu_test_single, 0, "Do we run a kfree_rcu() single-argument scale test?");
 torture_param(int, kfree_mult, 1, "Multiple of kfree_obj size to allocate.");
 
 static char *scale_type = "rcu";
@@ -667,10 +668,14 @@ kfree_scale_thread(void *arg)
 
 		for (i = 0; i < kfree_alloc_num; i++) {
 			alloc_ptr = kmalloc(kfree_mult * sizeof(struct kfree_obj), GFP_KERNEL);
+
 			if (!alloc_ptr)
 				return -ENOMEM;
 
-			kfree_rcu(alloc_ptr, rh);
+			if (kfree_rcu_test_single)
+				kfree_rcu(alloc_ptr);
+			else
+				kfree_rcu(alloc_ptr, rh);
 		}
 
 		cond_resched();
-- 
2.20.1


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

end of thread, other threads:[~2021-02-17 17:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29 20:05 [PATCH 1/2] rcuscale: add kfree_rcu() single-argument scale test Uladzislau Rezki (Sony)
2021-01-29 20:05 ` [PATCH 2/2] kvfree_rcu: Use same set of flags as for single-argument Uladzislau Rezki (Sony)
2021-02-04 22:04   ` Paul E. McKenney
2021-02-08 12:46     ` Uladzislau Rezki
2021-02-04 14:14 ` [PATCH 1/2] rcuscale: add kfree_rcu() single-argument scale test Uladzislau Rezki
2021-02-04 21:46 ` Paul E. McKenney
2021-02-09 20:13   ` Uladzislau Rezki
2021-02-10  1:00     ` Paul E. McKenney
2021-02-15 16:27       ` Uladzislau Rezki
2021-02-16 17:35         ` Paul E. McKenney
2021-02-17 17:47           ` Uladzislau Rezki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).