From c1a5e213a9db1d10c65f95603a0ec2b70d673e97 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Tue, 17 Mar 2020 08:57:02 -0700 Subject: [PATCH] BACKPORT: rcu-tasks: Add a grace-period start time for throttling and debug This commit adds a place to record the grace-period start in jiffies. This will be used by later commits for debugging purposes and to throttle IPIs early in the grace period. Change-Id: I3b7dc9396c2449e34a67bff69e58c00d5cc5773a Signed-off-by: Paul E. McKenney --- kernel/rcu/tasks.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h index 07b1e5f96a16..b537d349fbde 100644 --- a/kernel/rcu/tasks.h +++ b/kernel/rcu/tasks.h @@ -40,6 +40,7 @@ struct rcu_tasks { struct rcu_head **cbs_tail; struct wait_queue_head cbs_wq; raw_spinlock_t cbs_lock; + unsigned long gp_start; struct task_struct *kthread_ptr; rcu_tasks_gp_func_t gp_func; pregp_func_t pregp_func; @@ -151,6 +152,7 @@ static int __noreturn rcu_tasks_kthread(void *arg) } // Wait for one grace period. + rtp->gp_start = jiffies; rtp->gp_func(rtp); /* Invoke the callbacks. */