Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157176301
D1969.id3988.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
878 B
Referenced Files
None
Subscribers
None
D1969.id3988.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
Wed, May 20, 1:27 AM (11 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33333425
Default Alt Text
D1969.id3988.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
Log In to Comment