diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-10-04 19:24:29 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-11-28 18:51:19 -0500 |
commit | dec98900eae1e22467182e58688abe5fae98bd5f (patch) | |
tree | abee049d6133dc260ca797e4ae2060d91f610491 /kernel/rcu | |
parent | 84585aa8b6ad24e5bdfba9db4a320a6aeed192ab (diff) |
rcu: Add ->dynticks field to rcu_dyntick trace event
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu')
-rw-r--r-- | kernel/rcu/tree.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 92de3bacda07..5febb76809f6 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
@@ -761,13 +761,13 @@ static void rcu_eqs_enter_common(bool user) | |||
761 | struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks); | 761 | struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks); |
762 | 762 | ||
763 | lockdep_assert_irqs_disabled(); | 763 | lockdep_assert_irqs_disabled(); |
764 | trace_rcu_dyntick(TPS("Start"), rdtp->dynticks_nesting, 0); | 764 | trace_rcu_dyntick(TPS("Start"), rdtp->dynticks_nesting, 0, rdtp->dynticks); |
765 | if (IS_ENABLED(CONFIG_RCU_EQS_DEBUG) && | 765 | if (IS_ENABLED(CONFIG_RCU_EQS_DEBUG) && |
766 | !user && !is_idle_task(current)) { | 766 | !user && !is_idle_task(current)) { |
767 | struct task_struct *idle __maybe_unused = | 767 | struct task_struct *idle __maybe_unused = |
768 | idle_task(smp_processor_id()); | 768 | idle_task(smp_processor_id()); |
769 | 769 | ||
770 | trace_rcu_dyntick(TPS("Error on entry: not idle task"), rdtp->dynticks_nesting, 0); | 770 | trace_rcu_dyntick(TPS("Error on entry: not idle task"), rdtp->dynticks_nesting, 0, rdtp->dynticks); |
771 | rcu_ftrace_dump(DUMP_ORIG); | 771 | rcu_ftrace_dump(DUMP_ORIG); |
772 | WARN_ONCE(1, "Current pid: %d comm: %s / Idle pid: %d comm: %s", | 772 | WARN_ONCE(1, "Current pid: %d comm: %s / Idle pid: %d comm: %s", |
773 | current->pid, current->comm, | 773 | current->pid, current->comm, |
@@ -880,15 +880,14 @@ void rcu_nmi_exit(void) | |||
880 | * leave it in non-RCU-idle state. | 880 | * leave it in non-RCU-idle state. |
881 | */ | 881 | */ |
882 | if (rdtp->dynticks_nmi_nesting != 1) { | 882 | if (rdtp->dynticks_nmi_nesting != 1) { |
883 | trace_rcu_dyntick(TPS("--="), rdtp->dynticks_nmi_nesting, | 883 | trace_rcu_dyntick(TPS("--="), rdtp->dynticks_nmi_nesting, rdtp->dynticks_nmi_nesting - 2, rdtp->dynticks); |
884 | rdtp->dynticks_nmi_nesting - 2); | ||
885 | WRITE_ONCE(rdtp->dynticks_nmi_nesting, /* No store tearing. */ | 884 | WRITE_ONCE(rdtp->dynticks_nmi_nesting, /* No store tearing. */ |
886 | rdtp->dynticks_nmi_nesting - 2); | 885 | rdtp->dynticks_nmi_nesting - 2); |
887 | return; | 886 | return; |
888 | } | 887 | } |
889 | 888 | ||
890 | /* This NMI interrupted an RCU-idle CPU, restore RCU-idleness. */ | 889 | /* This NMI interrupted an RCU-idle CPU, restore RCU-idleness. */ |
891 | trace_rcu_dyntick(TPS("Startirq"), rdtp->dynticks_nmi_nesting, 0); | 890 | trace_rcu_dyntick(TPS("Startirq"), rdtp->dynticks_nmi_nesting, 0, rdtp->dynticks); |
892 | WRITE_ONCE(rdtp->dynticks_nmi_nesting, 0); /* Avoid store tearing. */ | 891 | WRITE_ONCE(rdtp->dynticks_nmi_nesting, 0); /* Avoid store tearing. */ |
893 | rcu_dynticks_eqs_enter(); | 892 | rcu_dynticks_eqs_enter(); |
894 | } | 893 | } |
@@ -953,14 +952,13 @@ static void rcu_eqs_exit_common(long newval, int user) | |||
953 | rcu_dynticks_task_exit(); | 952 | rcu_dynticks_task_exit(); |
954 | rcu_dynticks_eqs_exit(); | 953 | rcu_dynticks_eqs_exit(); |
955 | rcu_cleanup_after_idle(); | 954 | rcu_cleanup_after_idle(); |
956 | trace_rcu_dyntick(TPS("End"), rdtp->dynticks_nesting, newval); | 955 | trace_rcu_dyntick(TPS("End"), rdtp->dynticks_nesting, newval, rdtp->dynticks); |
957 | if (IS_ENABLED(CONFIG_RCU_EQS_DEBUG) && | 956 | if (IS_ENABLED(CONFIG_RCU_EQS_DEBUG) && |
958 | !user && !is_idle_task(current)) { | 957 | !user && !is_idle_task(current)) { |
959 | struct task_struct *idle __maybe_unused = | 958 | struct task_struct *idle __maybe_unused = |
960 | idle_task(smp_processor_id()); | 959 | idle_task(smp_processor_id()); |
961 | 960 | ||
962 | trace_rcu_dyntick(TPS("Error on exit: not idle task"), | 961 | trace_rcu_dyntick(TPS("Error on exit: not idle task"), rdtp->dynticks_nesting, newval, rdtp->dynticks); |
963 | rdtp->dynticks_nesting, newval); | ||
964 | rcu_ftrace_dump(DUMP_ORIG); | 962 | rcu_ftrace_dump(DUMP_ORIG); |
965 | WARN_ONCE(1, "Current pid: %d comm: %s / Idle pid: %d comm: %s", | 963 | WARN_ONCE(1, "Current pid: %d comm: %s / Idle pid: %d comm: %s", |
966 | current->pid, current->comm, | 964 | current->pid, current->comm, |
@@ -1062,7 +1060,7 @@ void rcu_nmi_enter(void) | |||
1062 | } | 1060 | } |
1063 | trace_rcu_dyntick(incby == 1 ? TPS("Endirq") : TPS("++="), | 1061 | trace_rcu_dyntick(incby == 1 ? TPS("Endirq") : TPS("++="), |
1064 | rdtp->dynticks_nmi_nesting, | 1062 | rdtp->dynticks_nmi_nesting, |
1065 | rdtp->dynticks_nmi_nesting + incby); | 1063 | rdtp->dynticks_nmi_nesting + incby, rdtp->dynticks); |
1066 | WRITE_ONCE(rdtp->dynticks_nmi_nesting, /* Prevent store tearing. */ | 1064 | WRITE_ONCE(rdtp->dynticks_nmi_nesting, /* Prevent store tearing. */ |
1067 | rdtp->dynticks_nmi_nesting + incby); | 1065 | rdtp->dynticks_nmi_nesting + incby); |
1068 | barrier(); | 1066 | barrier(); |