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 <paulmck@kernel.org>
This commit is contained in:
Paul E. McKenney 2020-03-17 08:57:02 -07:00 • committed by basamaryan
commit c1a5e213a9
No known key found for this signature in database
GPG key ID: 210D5384FB2A5885

View file

@ -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. */