Summary: | scheduler: Allow non-migratable threads to bind to their current CPU | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Harrison Grundy <harrison.grundy> | ||||
Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | Open --- | ||||||
Severity: | Affects Only Me | CC: | agh, current, emaste, koobs, zlei | ||||
Priority: | --- | Keywords: | needs-patch, needs-qa | ||||
Version: | CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
URL: | https://github.com/AstrodogInc/freebsd_schedulers/blob/master/ule_patches/bind_nonmigratable_to_same_cpu.diff | ||||||
Attachments: |
|
+ } + else { should be: } else { but, what about just moving the KASSERT after the `if (PCPU_GET(cpuid) == cpu)` test? ^Triage: remove OBE flags. It seems we do not have usage that bind a thread to local CPU, otherwise `KASSERT(THREAD_CAN_MIGRATE(td), ("%p must be migratable", td))` will complain (when kernel built with option INVARIANTS). (In reply to Ed Maste from comment #1) > but, what about just moving the KASSERT after the `if (PCPU_GET(cpuid) == cpu)` test? I think that is much simpler. |
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.)