History

rcutorture: Require entire stutter period be post-boot

Currently, the rcu_torture_writer() function checks that all required grace periods elapse during a stutter interval, which is a multi-second time period during which the test load is removed. However, this check is suppressed during early boot (that is, before init is spawned) in order to avoid false positives that otherwise occur due to heavy load on the single boot CPU. Unfortunately, this approach is insufficient. It is possible that the stutter interval might end just as init is spawned, so that early boot conditions prevailed during almost the entire stutter interval. This commit therefore takes a snapshot of boot-complete state just before the stutter interval, thus suppressing the check for failure to complete grace periods unless the entire stutter interval took place after early boot.

Paul E. McKenney committed 5 years ago

Commit 12a910e1 parent e76506f1 file · +3 −1Browse files

Unified · Split

kernel/rcu/rcutorture.c+3−1
@@ -1070,6 +1070,7 @@ rcu_torture_fqs(void *arg) · 1069 unmodified lines
1070static int1070static int
1071rcu_torture_writer(void *arg)1071rcu_torture_writer(void *arg)
1072{1072{
1073 bool boot_ended;
1073 bool can_expedite = !rcu_gp_is_expedited() && !rcu_gp_is_normal();1074 bool can_expedite = !rcu_gp_is_expedited() && !rcu_gp_is_normal();
1074 unsigned long cookie;1075 unsigned long cookie;
1075 int expediting = 0;1076 int expediting = 0;
@@ -1239,12 +1240,13 @@ rcu_torture_writer(void *arg) · 163 unmodified lines
1239 !rcu_gp_is_normal();1240 !rcu_gp_is_normal();
1240 }1241 }
1241 rcu_torture_writer_state = RTWS_STUTTER;1242 rcu_torture_writer_state = RTWS_STUTTER;
1243 boot_ended = rcu_inkernel_boot_has_ended();
1242 stutter_waited = stutter_wait("rcu_torture_writer");1244 stutter_waited = stutter_wait("rcu_torture_writer");
1243 if (stutter_waited &&1245 if (stutter_waited &&
1244 !READ_ONCE(rcu_fwd_cb_nodelay) &&1246 !READ_ONCE(rcu_fwd_cb_nodelay) &&
1245 !cur_ops->slow_gps &&1247 !cur_ops->slow_gps &&
1246 !torture_must_stop() &&1248 !torture_must_stop() &&
1247 rcu_inkernel_boot_has_ended())1249 boot_ended)
1248 for (i = 0; i < ARRAY_SIZE(rcu_tortures); i++)1250 for (i = 0; i < ARRAY_SIZE(rcu_tortures); i++)
1249 if (list_empty(&rcu_tortures[i].rtort_free) &&1251 if (list_empty(&rcu_tortures[i].rtort_free) &&
1250 rcu_access_pointer(rcu_torture_current) !=1252 rcu_access_pointer(rcu_torture_current) !=

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t