|
@@ -2146,6 +2146,15 @@ static int __noreturn rcu_gp_kthread(void *arg)
|
|
TPS("fqsend"));
|
|
TPS("fqsend"));
|
|
cond_resched_rcu_qs();
|
|
cond_resched_rcu_qs();
|
|
WRITE_ONCE(rsp->gp_activity, jiffies);
|
|
WRITE_ONCE(rsp->gp_activity, jiffies);
|
|
|
|
+ ret = 0; /* Force full wait till next FQS. */
|
|
|
|
+ j = jiffies_till_next_fqs;
|
|
|
|
+ if (j > HZ) {
|
|
|
|
+ j = HZ;
|
|
|
|
+ jiffies_till_next_fqs = HZ;
|
|
|
|
+ } else if (j < 1) {
|
|
|
|
+ j = 1;
|
|
|
|
+ jiffies_till_next_fqs = 1;
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
/* Deal with stray signal. */
|
|
/* Deal with stray signal. */
|
|
cond_resched_rcu_qs();
|
|
cond_resched_rcu_qs();
|
|
@@ -2154,14 +2163,12 @@ static int __noreturn rcu_gp_kthread(void *arg)
|
|
trace_rcu_grace_period(rsp->name,
|
|
trace_rcu_grace_period(rsp->name,
|
|
READ_ONCE(rsp->gpnum),
|
|
READ_ONCE(rsp->gpnum),
|
|
TPS("fqswaitsig"));
|
|
TPS("fqswaitsig"));
|
|
- }
|
|
|
|
- j = jiffies_till_next_fqs;
|
|
|
|
- if (j > HZ) {
|
|
|
|
- j = HZ;
|
|
|
|
- jiffies_till_next_fqs = HZ;
|
|
|
|
- } else if (j < 1) {
|
|
|
|
- j = 1;
|
|
|
|
- jiffies_till_next_fqs = 1;
|
|
|
|
|
|
+ ret = 1; /* Keep old FQS timing. */
|
|
|
|
+ j = jiffies;
|
|
|
|
+ if (time_after(jiffies, rsp->jiffies_force_qs))
|
|
|
|
+ j = 1;
|
|
|
|
+ else
|
|
|
|
+ j = rsp->jiffies_force_qs - j;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|