rcu: Add extended-quiescent-state testing advice
If you add or remove calls to rcu_idle_enter(), rcu_user_enter(), rcu_irq_exit(), rcu_irq_exit_irqson(), rcu_idle_exit(), rcu_user_exit(), rcu_irq_enter(), rcu_irq_enter_irqson(), rcu_nmi_enter(), or rcu_nmi_exit(), you should run a full set of tests on a kernel built with CONFIG_RCU_EQS_DEBUG=y. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
parent
02a7c234e5
commit
c0da313e09
@ -837,6 +837,9 @@ static void rcu_eqs_enter(bool user)
|
|||||||
* We crowbar the ->dynticks_nesting field to zero to allow for
|
* We crowbar the ->dynticks_nesting field to zero to allow for
|
||||||
* the possibility of usermode upcalls having messed up our count
|
* the possibility of usermode upcalls having messed up our count
|
||||||
* of interrupt nesting level during the prior busy period.
|
* of interrupt nesting level during the prior busy period.
|
||||||
|
*
|
||||||
|
* If you add or remove a call to rcu_idle_enter(), be sure to test with
|
||||||
|
* CONFIG_RCU_EQS_DEBUG=y.
|
||||||
*/
|
*/
|
||||||
void rcu_idle_enter(void)
|
void rcu_idle_enter(void)
|
||||||
{
|
{
|
||||||
@ -852,6 +855,9 @@ void rcu_idle_enter(void)
|
|||||||
* is permitted between this call and rcu_user_exit(). This way the
|
* is permitted between this call and rcu_user_exit(). This way the
|
||||||
* CPU doesn't need to maintain the tick for RCU maintenance purposes
|
* CPU doesn't need to maintain the tick for RCU maintenance purposes
|
||||||
* when the CPU runs in userspace.
|
* when the CPU runs in userspace.
|
||||||
|
*
|
||||||
|
* If you add or remove a call to rcu_user_enter(), be sure to test with
|
||||||
|
* CONFIG_RCU_EQS_DEBUG=y.
|
||||||
*/
|
*/
|
||||||
void rcu_user_enter(void)
|
void rcu_user_enter(void)
|
||||||
{
|
{
|
||||||
@ -875,6 +881,9 @@ void rcu_user_enter(void)
|
|||||||
* Use things like work queues to work around this limitation.
|
* Use things like work queues to work around this limitation.
|
||||||
*
|
*
|
||||||
* You have been warned.
|
* You have been warned.
|
||||||
|
*
|
||||||
|
* If you add or remove a call to rcu_irq_exit(), be sure to test with
|
||||||
|
* CONFIG_RCU_EQS_DEBUG=y.
|
||||||
*/
|
*/
|
||||||
void rcu_irq_exit(void)
|
void rcu_irq_exit(void)
|
||||||
{
|
{
|
||||||
@ -899,6 +908,9 @@ void rcu_irq_exit(void)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Wrapper for rcu_irq_exit() where interrupts are enabled.
|
* Wrapper for rcu_irq_exit() where interrupts are enabled.
|
||||||
|
*
|
||||||
|
* If you add or remove a call to rcu_irq_exit_irqson(), be sure to test
|
||||||
|
* with CONFIG_RCU_EQS_DEBUG=y.
|
||||||
*/
|
*/
|
||||||
void rcu_irq_exit_irqson(void)
|
void rcu_irq_exit_irqson(void)
|
||||||
{
|
{
|
||||||
@ -971,6 +983,9 @@ static void rcu_eqs_exit(bool user)
|
|||||||
* allow for the possibility of usermode upcalls messing up our count
|
* allow for the possibility of usermode upcalls messing up our count
|
||||||
* of interrupt nesting level during the busy period that is just
|
* of interrupt nesting level during the busy period that is just
|
||||||
* now starting.
|
* now starting.
|
||||||
|
*
|
||||||
|
* If you add or remove a call to rcu_idle_exit(), be sure to test with
|
||||||
|
* CONFIG_RCU_EQS_DEBUG=y.
|
||||||
*/
|
*/
|
||||||
void rcu_idle_exit(void)
|
void rcu_idle_exit(void)
|
||||||
{
|
{
|
||||||
@ -987,6 +1002,9 @@ void rcu_idle_exit(void)
|
|||||||
*
|
*
|
||||||
* Exit RCU idle mode while entering the kernel because it can
|
* Exit RCU idle mode while entering the kernel because it can
|
||||||
* run a RCU read side critical section anytime.
|
* run a RCU read side critical section anytime.
|
||||||
|
*
|
||||||
|
* If you add or remove a call to rcu_user_exit(), be sure to test with
|
||||||
|
* CONFIG_RCU_EQS_DEBUG=y.
|
||||||
*/
|
*/
|
||||||
void rcu_user_exit(void)
|
void rcu_user_exit(void)
|
||||||
{
|
{
|
||||||
@ -1012,6 +1030,9 @@ void rcu_user_exit(void)
|
|||||||
* Use things like work queues to work around this limitation.
|
* Use things like work queues to work around this limitation.
|
||||||
*
|
*
|
||||||
* You have been warned.
|
* You have been warned.
|
||||||
|
*
|
||||||
|
* If you add or remove a call to rcu_irq_enter(), be sure to test with
|
||||||
|
* CONFIG_RCU_EQS_DEBUG=y.
|
||||||
*/
|
*/
|
||||||
void rcu_irq_enter(void)
|
void rcu_irq_enter(void)
|
||||||
{
|
{
|
||||||
@ -1037,6 +1058,9 @@ void rcu_irq_enter(void)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Wrapper for rcu_irq_enter() where interrupts are enabled.
|
* Wrapper for rcu_irq_enter() where interrupts are enabled.
|
||||||
|
*
|
||||||
|
* If you add or remove a call to rcu_irq_enter_irqson(), be sure to test
|
||||||
|
* with CONFIG_RCU_EQS_DEBUG=y.
|
||||||
*/
|
*/
|
||||||
void rcu_irq_enter_irqson(void)
|
void rcu_irq_enter_irqson(void)
|
||||||
{
|
{
|
||||||
@ -1055,6 +1079,9 @@ void rcu_irq_enter_irqson(void)
|
|||||||
* that the CPU is active. This implementation permits nested NMIs, as
|
* that the CPU is active. This implementation permits nested NMIs, as
|
||||||
* long as the nesting level does not overflow an int. (You will probably
|
* long as the nesting level does not overflow an int. (You will probably
|
||||||
* run out of stack space first.)
|
* run out of stack space first.)
|
||||||
|
*
|
||||||
|
* If you add or remove a call to rcu_nmi_enter(), be sure to test
|
||||||
|
* with CONFIG_RCU_EQS_DEBUG=y.
|
||||||
*/
|
*/
|
||||||
void rcu_nmi_enter(void)
|
void rcu_nmi_enter(void)
|
||||||
{
|
{
|
||||||
@ -1087,6 +1114,9 @@ void rcu_nmi_enter(void)
|
|||||||
* RCU-idle period, update rdtp->dynticks and rdtp->dynticks_nmi_nesting
|
* RCU-idle period, update rdtp->dynticks and rdtp->dynticks_nmi_nesting
|
||||||
* to let the RCU grace-period handling know that the CPU is back to
|
* to let the RCU grace-period handling know that the CPU is back to
|
||||||
* being RCU-idle.
|
* being RCU-idle.
|
||||||
|
*
|
||||||
|
* If you add or remove a call to rcu_nmi_exit(), be sure to test
|
||||||
|
* with CONFIG_RCU_EQS_DEBUG=y.
|
||||||
*/
|
*/
|
||||||
void rcu_nmi_exit(void)
|
void rcu_nmi_exit(void)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user