diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-06-22 20:06:26 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-09-23 10:41:54 -0400 |
commit | 4cdfc175c25c89eedc08460b5e6239c2ec67fcb6 (patch) | |
tree | 716acd208cb0633cdd19fc0cd5ad601906cceb24 /kernel/rcutree.h | |
parent | b402b73b3afe3614bc0e921ebe18013ea103115a (diff) |
rcu: Move quiescent-state forcing into kthread
As the first step towards allowing quiescent-state forcing to be
preemptible, this commit moves RCU quiescent-state forcing into the
same kthread that is now used to initialize and clean up after grace
periods. This is yet another step towards keeping scheduling
latency down to a dull roar.
Updated to change from raw_spin_lock_irqsave() to raw_spin_lock_irq()
and to remove the now-unused rcu_state structure fields as suggested by
Peter Zijlstra.
Reported-by: Mike Galbraith <mgalbraith@suse.de>
Reported-by: Dimitri Sivanich <sivanich@sgi.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree.h')
-rw-r--r-- | kernel/rcutree.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/kernel/rcutree.h b/kernel/rcutree.h index 5d92b80a0a28..2d04106d1533 100644 --- a/kernel/rcutree.h +++ b/kernel/rcutree.h | |||
@@ -378,13 +378,6 @@ struct rcu_state { | |||
378 | 378 | ||
379 | u8 fqs_state ____cacheline_internodealigned_in_smp; | 379 | u8 fqs_state ____cacheline_internodealigned_in_smp; |
380 | /* Force QS state. */ | 380 | /* Force QS state. */ |
381 | u8 fqs_active; /* force_quiescent_state() */ | ||
382 | /* is running. */ | ||
383 | u8 fqs_need_gp; /* A CPU was prevented from */ | ||
384 | /* starting a new grace */ | ||
385 | /* period because */ | ||
386 | /* force_quiescent_state() */ | ||
387 | /* was running. */ | ||
388 | u8 boost; /* Subject to priority boost. */ | 381 | u8 boost; /* Subject to priority boost. */ |
389 | unsigned long gpnum; /* Current gp number. */ | 382 | unsigned long gpnum; /* Current gp number. */ |
390 | unsigned long completed; /* # of last completed gp. */ | 383 | unsigned long completed; /* # of last completed gp. */ |
@@ -413,8 +406,6 @@ struct rcu_state { | |||
413 | struct completion barrier_completion; /* Wake at barrier end. */ | 406 | struct completion barrier_completion; /* Wake at barrier end. */ |
414 | unsigned long n_barrier_done; /* ++ at start and end of */ | 407 | unsigned long n_barrier_done; /* ++ at start and end of */ |
415 | /* _rcu_barrier(). */ | 408 | /* _rcu_barrier(). */ |
416 | raw_spinlock_t fqslock; /* Only one task forcing */ | ||
417 | /* quiescent states. */ | ||
418 | unsigned long jiffies_force_qs; /* Time at which to invoke */ | 409 | unsigned long jiffies_force_qs; /* Time at which to invoke */ |
419 | /* force_quiescent_state(). */ | 410 | /* force_quiescent_state(). */ |
420 | unsigned long n_force_qs; /* Number of calls to */ | 411 | unsigned long n_force_qs; /* Number of calls to */ |
@@ -433,6 +424,10 @@ struct rcu_state { | |||
433 | struct list_head flavors; /* List of RCU flavors. */ | 424 | struct list_head flavors; /* List of RCU flavors. */ |
434 | }; | 425 | }; |
435 | 426 | ||
427 | /* Values for rcu_state structure's gp_flags field. */ | ||
428 | #define RCU_GP_FLAG_INIT 0x1 /* Need grace-period initialization. */ | ||
429 | #define RCU_GP_FLAG_FQS 0x2 /* Need grace-period quiescent-state forcing. */ | ||
430 | |||
436 | extern struct list_head rcu_struct_flavors; | 431 | extern struct list_head rcu_struct_flavors; |
437 | #define for_each_rcu_flavor(rsp) \ | 432 | #define for_each_rcu_flavor(rsp) \ |
438 | list_for_each_entry((rsp), &rcu_struct_flavors, flavors) | 433 | list_for_each_entry((rsp), &rcu_struct_flavors, flavors) |