Mercurial > illumos > illumos-gate
changeset 3877:e3d0fb5a4f90
6518397 idle threads are too greedy when stealing on NUMA machines
author | esaxe |
---|---|
date | Wed, 21 Mar 2007 16:55:41 -0700 |
parents | 5643dbdd82be |
children | c25138e290d8 |
files | usr/src/uts/common/disp/disp.c |
diffstat | 1 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/disp/disp.c Wed Mar 21 14:39:24 2007 -0700 +++ b/usr/src/uts/common/disp/disp.c Wed Mar 21 16:55:41 2007 -0700 @@ -1952,27 +1952,27 @@ ASSERT(CPU_ACTIVE(ocp)); /* - * End our stroll around the partition if: + * End our stroll around this lpl if: * * - Something became runnable on the local - * queue + * queue...which also ends our stroll around + * the partition. * - * - We're at the broadest level of locality and - * we happen across another idle CPU. At the - * highest level of locality, all CPUs will - * walk the partition's CPUs in the same - * order, so we can end our stroll taking - * comfort in knowing the other idle CPU is - * already covering the next portion of the - * list. + * - We happen across another idle CPU. + * Since it is patrolling the next portion + * of the lpl's list (assuming it's not + * halted), move to the next higher level + * of locality. */ - if (cp->cpu_disp->disp_nrunnable != 0) - break; + if (cp->cpu_disp->disp_nrunnable != 0) { + kpreempt_enable(); + return (NULL); + } if (ocp->cpu_dispatch_pri == -1) { if (ocp->cpu_disp_flags & CPU_DISP_HALTED) continue; - else if (lpl->lpl_parent == NULL) + else break; }