File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -801,6 +801,10 @@ static int rcu_watching_snap_save(struct rcu_data *rdp)
801
801
return 0 ;
802
802
}
803
803
804
+ #ifndef arch_irq_stat_cpu
805
+ #define arch_irq_stat_cpu (cpu ) 0
806
+ #endif
807
+
804
808
/*
805
809
* Returns positive if the specified CPU has passed through a quiescent state
806
810
* by virtue of being in or having passed through an dynticks idle state since
@@ -936,9 +940,9 @@ static int rcu_watching_snap_recheck(struct rcu_data *rdp)
936
940
rsrp -> cputime_irq = kcpustat_field (kcsp , CPUTIME_IRQ , cpu );
937
941
rsrp -> cputime_softirq = kcpustat_field (kcsp , CPUTIME_SOFTIRQ , cpu );
938
942
rsrp -> cputime_system = kcpustat_field (kcsp , CPUTIME_SYSTEM , cpu );
939
- rsrp -> nr_hardirqs = kstat_cpu_irqs_sum (rdp -> cpu );
940
- rsrp -> nr_softirqs = kstat_cpu_softirqs_sum (rdp -> cpu );
941
- rsrp -> nr_csw = nr_context_switches_cpu (rdp -> cpu );
943
+ rsrp -> nr_hardirqs = kstat_cpu_irqs_sum (cpu ) + arch_irq_stat_cpu ( cpu );
944
+ rsrp -> nr_softirqs = kstat_cpu_softirqs_sum (cpu );
945
+ rsrp -> nr_csw = nr_context_switches_cpu (cpu );
942
946
rsrp -> jiffies = jiffies ;
943
947
rsrp -> gp_seq = rdp -> gp_seq ;
944
948
}
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ struct rcu_snap_record {
168
168
u64 cputime_irq ; /* Accumulated cputime of hard irqs */
169
169
u64 cputime_softirq ;/* Accumulated cputime of soft irqs */
170
170
u64 cputime_system ; /* Accumulated cputime of kernel tasks */
171
- unsigned long nr_hardirqs ; /* Accumulated number of hard irqs */
171
+ u64 nr_hardirqs ; /* Accumulated number of hard irqs */
172
172
unsigned int nr_softirqs ; /* Accumulated number of soft irqs */
173
173
unsigned long long nr_csw ; /* Accumulated number of task switches */
174
174
unsigned long jiffies ; /* Track jiffies value */
Original file line number Diff line number Diff line change @@ -435,8 +435,8 @@ static void print_cpu_stat_info(int cpu)
435
435
rsr .cputime_system = kcpustat_field (kcsp , CPUTIME_SYSTEM , cpu );
436
436
437
437
pr_err ("\t hardirqs softirqs csw/system\n" );
438
- pr_err ("\t number: %8ld %10d %12lld\n" ,
439
- kstat_cpu_irqs_sum (cpu ) - rsrp -> nr_hardirqs ,
438
+ pr_err ("\t number: %8lld %10d %12lld\n" ,
439
+ kstat_cpu_irqs_sum (cpu ) + arch_irq_stat_cpu ( cpu ) - rsrp -> nr_hardirqs ,
440
440
kstat_cpu_softirqs_sum (cpu ) - rsrp -> nr_softirqs ,
441
441
nr_context_switches_cpu (cpu ) - rsrp -> nr_csw );
442
442
pr_err ("\tcputime: %8lld %10lld %12lld ==> %d(ms)\n" ,
You can’t perform that action at this time.
0 commit comments