Skip to content

Commit

Permalink
iokernel: numa policy fix for no hyperthreads
Browse files Browse the repository at this point in the history
  • Loading branch information
aousterh committed Aug 11, 2019
1 parent 3fce6d8 commit 08fb101
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions iokernel/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,16 +209,18 @@ static unsigned int numa_choose_core(struct proc *p)
unsigned int core, tmp;
DEFINE_BITMAP(core_subset, NCPU);

/* first try to find a matching active hyperthread */
sched_for_each_allowed_core(core, tmp) {
unsigned int sib = sched_siblings[core];
if (cores[core] != sd)
continue;
if (cores[sib] == sd || (cores[sib] != NULL &&
!numa_proc_is_preemptible(cores[sib], sd)))
continue;

return sib;
/* first try to find a matching active hyperthread */
if (!cfg.noht) {
sched_for_each_allowed_core(core, tmp) {
unsigned int sib = sched_siblings[core];
if (cores[core] != sd)
continue;
if (cores[sib] == sd || (cores[sib] != NULL &&
!numa_proc_is_preemptible(cores[sib], sd)))
continue;

return sib;
}
}

/* then try to find a core on the preferred socket */
Expand Down

0 comments on commit 08fb101

Please sign in to comment.