Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154877177
D23483.id67708.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D23483.id67708.diff
View Options
Index: sys/kern/kern_intr.c
===================================================================
--- sys/kern/kern_intr.c
+++ sys/kern/kern_intr.c
@@ -1208,6 +1208,7 @@
struct thread *td;
struct proc *p;
int wake, epoch_count;
+ bool needs_epoch;
td = curthread;
p = td->td_proc;
@@ -1242,20 +1243,21 @@
* that the load of ih_need in ithread_execute_handlers()
* is ordered after the load of it_need here.
*/
- if (ie->ie_hflags & IH_NET) {
+ needs_epoch = (ie->ie_hflags & IH_NET) ? true : false;
+ if (needs_epoch) {
epoch_count = 0;
NET_EPOCH_ENTER(et);
}
while (atomic_cmpset_acq_int(&ithd->it_need, 1, 0) != 0) {
ithread_execute_handlers(p, ie);
- if ((ie->ie_hflags & IH_NET) &&
+ if (needs_epoch &&
++epoch_count >= intr_epoch_batch) {
NET_EPOCH_EXIT(et);
epoch_count = 0;
NET_EPOCH_ENTER(et);
}
}
- if (ie->ie_hflags & IH_NET)
+ if (needs_epoch)
NET_EPOCH_EXIT(et);
WITNESS_WARN(WARN_PANIC, NULL, "suspending ithread");
mtx_assert(&Giant, MA_NOTOWNED);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 30, 5:12 PM (6 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32536390
Default Alt Text
D23483.id67708.diff (1 KB)
Attached To
Mode
D23483: Fix for unbalanced EPOCH(9) usage in kernel interrupt handler
Attached
Detach File
Event Timeline
Log In to Comment