# HG changeset patch # User iap10@labyrinth.cl.cam.ac.uk # Date 1097638262 0 # Node ID 44ab932026a6d9c15aa0f30522ca06d9741d97ac # Parent 31706ae3b457a03e492aac13f2c53f9d4785ee77 bitkeeper revision 1.1159.1.227 (416ca176osUUBQBGiZS4hIALhIyUsg) Slightly smarter initial CPU placement. diff -r 31706ae3b457 -r 44ab932026a6 xen/common/dom0_ops.c --- a/xen/common/dom0_ops.c Wed Oct 13 00:22:54 2004 +0000 +++ b/xen/common/dom0_ops.c Wed Oct 13 03:31:02 2004 +0000 @@ -178,7 +178,29 @@ long do_dom0_op(dom0_op_t *u_dom0_op) break; if ( op->u.createdomain.cpu == -1 ) - pro = (unsigned int)dom % smp_num_cpus; + { + /* Do an initial placement. Fix me for hyperthreading! */ + struct domain *d; + int i, j=0, c[smp_num_cpus]; + + pro=0; /* keep compiler happy */ + + for (i=0;iprocessor]++; + j++; + } + + for (i=0;iu.createdomain.cpu % smp_num_cpus;