Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177476673
D1969.1794517982.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
878 B
Referenced Files
None
Subscribers
None
D1969.1794517982.diff
View Options
Index: sys/kern/sched_ule.c
===================================================================
--- sys/kern/sched_ule.c
+++ sys/kern/sched_ule.c
@@ -2510,16 +2510,20 @@
ts = td->td_sched;
if (ts->ts_flags & TSF_BOUND)
sched_unbind(td);
- KASSERT(THREAD_CAN_MIGRATE(td), ("%p must be migratable", td));
- ts->ts_flags |= TSF_BOUND;
- sched_pin();
- if (PCPU_GET(cpuid) == cpu)
+ if (PCPU_GET(cpuid) == cpu) {
+ ts->ts_flags |= TSF_BOUND;
+ sched_pin();
return;
- ts->ts_cpu = cpu;
- /* When we return from mi_switch we'll be on the correct cpu. */
- mi_switch(SW_VOL, NULL);
+ }
+ else {
+ KASSERT(THREAD_CAN_MIGRATE(td), ("%p must be migratable", td));
+ ts->ts_flags |= TSF_BOUND;
+ sched_pin();
+ ts->ts_cpu = cpu;
+ /* When we return from mi_switch we'll be on the correct cpu. */
+ mi_switch(SW_VOL, NULL);
+ }
}
-
/*
* Release a bound thread.
*/
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 12, 9:13 PM (16 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41684177
Default Alt Text
D1969.1794517982.diff (878 B)
Attached To
Mode
D1969: Allow binding non-migratable threads to the CPU they're already running on
Attached
Detach File
Event Timeline