Page MenuHomeFreeBSD

D60862.1795057989.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D60862.1795057989.diff

diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c
--- a/sys/x86/x86/mp_x86.c
+++ b/sys/x86/x86/mp_x86.c
@@ -1347,14 +1347,21 @@
td->td_intr_nesting_level++;
oldframe = td->td_intr_frame;
td->td_intr_frame = frame;
+
+#ifdef COUNT_IPIS
+ if (ipi_bitmap & (1 << IPI_AST)) {
+ (*ipi_ast_counts[cpu])++;
+ if (ipi_bitmap & (1 << IPI_HARDCLOCK)) {
+ (*ipi_hardclock_counts[cpu])++;
+ if (ipi_bitmap & (1 << IPI_PREEMPT))
+ (*ipi_preempt_counts[cpu])++;
+#endif
+
#if defined(STACK) || defined(DDB)
if (ipi_bitmap & (1 << IPI_TRACE))
stack_capture_intr();
#endif
if (ipi_bitmap & (1 << IPI_HARDCLOCK)) {
-#ifdef COUNT_IPIS
- (*ipi_hardclock_counts[cpu])++;
-#endif
/*
* Enter a critical section so that hardclockintr() can execute
* entirely without preemption (as it calls code that can enter
@@ -1371,9 +1378,6 @@
critical_exit();
}
if (ipi_bitmap & (1 << IPI_AST)) {
-#ifdef COUNT_IPIS
- (*ipi_ast_counts[cpu])++;
-#endif
/* Nothing to do for AST */
}
/*
@@ -1382,13 +1386,8 @@
* IPIs are processed in due course (in particular, hardclockintr()), it
* has to be called last.
*/
- if (ipi_bitmap & (1 << IPI_PREEMPT)) {
-#ifdef COUNT_IPIS
- (*ipi_preempt_counts[cpu])++;
-#endif
- if (do_preempt)
- sched_preempt(td);
- }
+ if (ipi_bitmap & (1 << IPI_PREEMPT) && do_preempt)
+ sched_preempt(td);
td->td_intr_frame = oldframe;
td->td_intr_nesting_level--;
}

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 19, 3:13 AM (7 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41112645
Default Alt Text
D60862.1795057989.diff (1 KB)

Event Timeline