Bug 197921 - scheduler: Allow non-migratable threads to bind to their current CPU
Summary: scheduler: Allow non-migratable threads to bind to their current CPU
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL: https://github.com/AstrodogInc/freebs...
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2015-02-22 15:00 UTC by Harrison Grundy
Modified: 2019-05-30 01:42 UTC (History)
3 users (show)

See Also:
koobs: mfc-stable11?
koobs: mfc-stable12?


Attachments
Allow threads to bind to the local CPU even if marked unmigratable. (911 bytes, patch)
2015-02-22 15:00 UTC, Harrison Grundy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harrison Grundy 2015-02-22 15:00:48 UTC
Created attachment 153316 [details]
Allow threads to bind to the local CPU even if marked unmigratable.

ULE currently prohibits sched_bind()'ing to the current CPU if a thread as marked as un-migratable. This should only apply to threads attempting to bind to other CPUs (as no migration is necessary to bind them to the existing local CPU.)
Comment 1 Ed Maste freebsd_committer 2019-05-29 20:59:08 UTC
+	}
+	else {	

should be:

} else {

but, what about just moving the KASSERT after the `if (PCPU_GET(cpuid) == cpu)` test?