mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] rcu/kvfree: Do not run a page work if a cache is disabled
@ 2023-04-11 13:13 Uladzislau Rezki (Sony)
  2023-04-12  4:49 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Uladzislau Rezki (Sony) @ 2023-04-11 13:13 UTC (permalink / raw)
  To: Paul E . McKenney
  Cc: RCU, quic_neeraju, Boqun Feng, Joel Fernandes, LKML,
	Uladzislau Rezki, Oleksiy Avramchenko, Frederic Weisbecker

By default the cache size is 5 pages per-cpu. But it can
be disabled at boot time by setting the rcu_min_cached_objs
to zero.

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

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 35be35f8236b..21e3d9dffde5 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3246,6 +3246,10 @@ static void fill_page_cache_func(struct work_struct *work)
 static void
 run_page_cache_worker(struct kfree_rcu_cpu *krcp)
 {
+	// If cache disabled, bail out.
+	if (!rcu_min_cached_objs)
+		return;
+
 	if (rcu_scheduler_active == RCU_SCHEDULER_RUNNING &&
 			!atomic_xchg(&krcp->work_in_progress, 1)) {
 		if (atomic_read(&krcp->backoff_page_cache_fill)) {
-- 
2.30.2


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

end of thread, other threads:[~2023-04-12  4:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-11 13:13 [PATCH 1/1] rcu/kvfree: Do not run a page work if a cache is disabled Uladzislau Rezki (Sony)
2023-04-12  4:49 ` 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

all inboxes | Powered by JetHome®