diff options
-rw-r--r-- | kernel/rcutree.c | 18 | ||||
-rw-r--r-- | kernel/rcutree.h | 15 |
2 files changed, 26 insertions, 7 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 1009c0ccd4b1..f344d3c824a4 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -218,8 +218,8 @@ module_param(blimit, long, 0444); | |||
218 | module_param(qhimark, long, 0444); | 218 | module_param(qhimark, long, 0444); |
219 | module_param(qlowmark, long, 0444); | 219 | module_param(qlowmark, long, 0444); |
220 | 220 | ||
221 | static ulong jiffies_till_first_fqs = RCU_JIFFIES_TILL_FORCE_QS; | 221 | static ulong jiffies_till_first_fqs = ULONG_MAX; |
222 | static ulong jiffies_till_next_fqs = RCU_JIFFIES_TILL_FORCE_QS; | 222 | static ulong jiffies_till_next_fqs = ULONG_MAX; |
223 | 223 | ||
224 | module_param(jiffies_till_first_fqs, ulong, 0644); | 224 | module_param(jiffies_till_first_fqs, ulong, 0644); |
225 | module_param(jiffies_till_next_fqs, ulong, 0644); | 225 | module_param(jiffies_till_next_fqs, ulong, 0644); |
@@ -3265,11 +3265,25 @@ static void __init rcu_init_one(struct rcu_state *rsp, | |||
3265 | */ | 3265 | */ |
3266 | static void __init rcu_init_geometry(void) | 3266 | static void __init rcu_init_geometry(void) |
3267 | { | 3267 | { |
3268 | ulong d; | ||
3268 | int i; | 3269 | int i; |
3269 | int j; | 3270 | int j; |
3270 | int n = nr_cpu_ids; | 3271 | int n = nr_cpu_ids; |
3271 | int rcu_capacity[MAX_RCU_LVLS + 1]; | 3272 | int rcu_capacity[MAX_RCU_LVLS + 1]; |
3272 | 3273 | ||
3274 | /* | ||
3275 | * Initialize any unspecified boot parameters. | ||
3276 | * The default values of jiffies_till_first_fqs and | ||
3277 | * jiffies_till_next_fqs are set to the RCU_JIFFIES_TILL_FORCE_QS | ||
3278 | * value, which is a function of HZ, then adding one for each | ||
3279 | * RCU_JIFFIES_FQS_DIV CPUs that might be on the system. | ||
3280 | */ | ||
3281 | d = RCU_JIFFIES_TILL_FORCE_QS + nr_cpu_ids / RCU_JIFFIES_FQS_DIV; | ||
3282 | if (jiffies_till_first_fqs == ULONG_MAX) | ||
3283 | jiffies_till_first_fqs = d; | ||
3284 | if (jiffies_till_next_fqs == ULONG_MAX) | ||
3285 | jiffies_till_next_fqs = d; | ||
3286 | |||
3273 | /* If the compile-time values are accurate, just leave. */ | 3287 | /* If the compile-time values are accurate, just leave. */ |
3274 | if (rcu_fanout_leaf == CONFIG_RCU_FANOUT_LEAF && | 3288 | if (rcu_fanout_leaf == CONFIG_RCU_FANOUT_LEAF && |
3275 | nr_cpu_ids == NR_CPUS) | 3289 | nr_cpu_ids == NR_CPUS) |
diff --git a/kernel/rcutree.h b/kernel/rcutree.h index 4df503470e42..4a39d364493c 100644 --- a/kernel/rcutree.h +++ b/kernel/rcutree.h | |||
@@ -343,12 +343,17 @@ struct rcu_data { | |||
343 | #define RCU_FORCE_QS 3 /* Need to force quiescent state. */ | 343 | #define RCU_FORCE_QS 3 /* Need to force quiescent state. */ |
344 | #define RCU_SIGNAL_INIT RCU_SAVE_DYNTICK | 344 | #define RCU_SIGNAL_INIT RCU_SAVE_DYNTICK |
345 | 345 | ||
346 | #define RCU_JIFFIES_TILL_FORCE_QS 3 /* for rsp->jiffies_force_qs */ | 346 | #define RCU_JIFFIES_TILL_FORCE_QS (1 + (HZ > 250) + (HZ > 500)) |
347 | /* For jiffies_till_first_fqs and */ | ||
348 | /* and jiffies_till_next_fqs. */ | ||
347 | 349 | ||
348 | #define RCU_STALL_RAT_DELAY 2 /* Allow other CPUs time */ | 350 | #define RCU_JIFFIES_FQS_DIV 256 /* Very large systems need more */ |
349 | /* to take at least one */ | 351 | /* delay between bouts of */ |
350 | /* scheduling clock irq */ | 352 | /* quiescent-state forcing. */ |
351 | /* before ratting on them. */ | 353 | |
354 | #define RCU_STALL_RAT_DELAY 2 /* Allow other CPUs time to take */ | ||
355 | /* at least one scheduling clock */ | ||
356 | /* irq before ratting on them. */ | ||
352 | 357 | ||
353 | #define rcu_wait(cond) \ | 358 | #define rcu_wait(cond) \ |
354 | do { \ | 359 | do { \ |