[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220901221720.1105021-16-joel@joelfernandes.org>
Date: Thu, 1 Sep 2022 22:17:17 +0000
From: "Joel Fernandes (Google)" <joel@...lfernandes.org>
To: rcu@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, rushikesh.s.kadam@...el.com,
urezki@...il.com, neeraj.iitr10@...il.com, frederic@...nel.org,
paulmck@...nel.org, rostedt@...dmis.org, vineeth@...byteword.org,
boqun.feng@...il.com,
"Joel Fernandes (Google)" <joel@...lfernandes.org>
Subject: [PATCH v5 15/18] kernel: Move various core kernel usages to call_rcu_lazy()
Signed-off-by: Joel Fernandes (Google) <joel@...lfernandes.org>
---
kernel/exit.c | 2 +-
kernel/pid.c | 2 +-
kernel/time/posix-timers.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/exit.c b/kernel/exit.c
index 84021b24f79e..b2a96356980a 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -180,7 +180,7 @@ static void delayed_put_task_struct(struct rcu_head *rhp)
void put_task_struct_rcu_user(struct task_struct *task)
{
if (refcount_dec_and_test(&task->rcu_users))
- call_rcu(&task->rcu, delayed_put_task_struct);
+ call_rcu_lazy(&task->rcu, delayed_put_task_struct);
}
void release_task(struct task_struct *p)
diff --git a/kernel/pid.c b/kernel/pid.c
index 2fc0a16ec77b..5a5144519d70 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -153,7 +153,7 @@ void free_pid(struct pid *pid)
}
spin_unlock_irqrestore(&pidmap_lock, flags);
- call_rcu(&pid->rcu, delayed_put_pid);
+ call_rcu_lazy(&pid->rcu, delayed_put_pid);
}
struct pid *alloc_pid(struct pid_namespace *ns, pid_t *set_tid,
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
index 5dead89308b7..660daa427b41 100644
--- a/kernel/time/posix-timers.c
+++ b/kernel/time/posix-timers.c
@@ -485,7 +485,7 @@ static void release_posix_timer(struct k_itimer *tmr, int it_id_set)
}
put_pid(tmr->it_pid);
sigqueue_free(tmr->sigq);
- call_rcu(&tmr->rcu, k_itimer_rcu_free);
+ call_rcu_lazy(&tmr->rcu, k_itimer_rcu_free);
}
static int common_timer_create(struct k_itimer *new_timer)
--
2.37.2.789.g6183377224-goog
Powered by blists - more mailing lists