• Robert Ricci's avatar
    Fix a bug that's over 10 years old · d7fb737d
    Robert Ricci authored
    I think this must get the award for oldest (frequently excercised) bug
    in the Emulab source. Thanks to the magic of the git pickaxe, I
    discovered that code with this problem was first committed Monday, May
    22, 2000, when it used to be in assign_hw/assign.cc
    
    assign used to use a priority queue to 'randomly' select unassigned
    nodes to try assigning. Turns out this is not very random! A node can
    get unlucky, get a very low random priority assigned to it, and get
    stuck in the queue for a very, very, very long time. As a result, I've
    seen assign try to re-assign the same node several thousand times in a
    row, when there are others waiting to be re-assigned. Of course, this is
    going to result in very poor exploration of the state space.
    
    I changed the unassigned node selection process to use a regular list,
    and select an item from the list at random at the time of item removal.
    This gets a much more even distribution of nodes, at the small cost of
    linear iteration over the list of unassigned nodes.  This should be a
    pretty minor cost, though, as iteration over this list should be cheap
    and the list itself should generally be pretty small.
    
    Also added some debugging statements.
    d7fb737d
Name
Last commit
Last update
..
comet Loading commit data...
toptools Loading commit data...
GNUmakefile.in Loading commit data...
README Loading commit data...
about.txt Loading commit data...
anneal.cc Loading commit data...
anneal.h Loading commit data...
annotate.cc Loading commit data...
annotate.h Loading commit data...
annotate_rspec.cc Loading commit data...
annotate_rspec.h Loading commit data...
annotate_rspec_v2.cc Loading commit data...
annotate_rspec_v2.h Loading commit data...
annotate_vtop.cc Loading commit data...
annotate_vtop.h Loading commit data...
assign.cc Loading commit data...
assign_internals.txt Loading commit data...
assign_todo.txt Loading commit data...
common.h Loading commit data...
compile-options.txt Loading commit data...
config.cc Loading commit data...
config.h Loading commit data...
delay.h Loading commit data...
dtest.ptop Loading commit data...
dtest.top Loading commit data...
emulab_extensions_parser.cc Loading commit data...
emulab_extensions_parser.h Loading commit data...
featuredesire.cc Loading commit data...
featuredesire.h Loading commit data...
file_formats.txt Loading commit data...
forwarding.cc Loading commit data...
forwarding.h Loading commit data...
fstring.cc Loading commit data...
fstring.h Loading commit data...
fstringtest.cc Loading commit data...
maps.h Loading commit data...
neighborhood.cc Loading commit data...
neighborhood.h Loading commit data...
parse_advertisement_rspec.cc Loading commit data...
parse_advertisement_rspec.h Loading commit data...
parse_error_handler.cc Loading commit data...
parse_error_handler.h Loading commit data...
parse_policy_xml.cc Loading commit data...
parse_policy_xml.h Loading commit data...
parse_ptop.cc Loading commit data...
parse_ptop_xml.cc Loading commit data...
parse_ptop_xml.h Loading commit data...
parse_request_rspec.cc Loading commit data...
parse_request_rspec.h Loading commit data...
parse_top.cc Loading commit data...
parse_vtop_xml.cc Loading commit data...
parse_vtop_xml.h Loading commit data...
parser.cc Loading commit data...
parser.h Loading commit data...
pclass.cc Loading commit data...
pclass.h Loading commit data...
pclass_vclass_fixed.txt Loading commit data...
physical.h Loading commit data...
policy.rnc Loading commit data...
port.h Loading commit data...
ptop-top.xsd Loading commit data...
ptop.rnc Loading commit data...
ptop.rng Loading commit data...
ptop.xsd Loading commit data...
rspec_parser.cc Loading commit data...
rspec_parser.h Loading commit data...
rspec_parser_helper.cc Loading commit data...
rspec_parser_helper.h Loading commit data...
rspec_parser_v1.cc Loading commit data...
rspec_parser_v1.h Loading commit data...
rspec_parser_v2.cc Loading commit data...
rspec_parser_v2.h Loading commit data...
score.cc Loading commit data...
score.h Loading commit data...
solution.cc Loading commit data...
solution.h Loading commit data...
test-ptop.xml Loading commit data...
test-top.xml Loading commit data...
test.ptop Loading commit data...
test.top Loading commit data...
test2.ptop Loading commit data...
test2a.top Loading commit data...
test_ugly.ptop Loading commit data...
test_ugly.top Loading commit data...
top.rnc Loading commit data...
top.rng Loading commit data...
vclass.cc Loading commit data...
vclass.h Loading commit data...
virtual.h Loading commit data...
vtop-top.xsd Loading commit data...
vtop.rnc Loading commit data...
vtop.rng Loading commit data...
vtop.xsd Loading commit data...
xmlhelpers.cc Loading commit data...
xmlhelpers.h Loading commit data...
xsdgen Loading commit data...
xstr.h Loading commit data...