[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 20/33] ts-host-alloc-Executive: Honour various hostalloc_* runvars
We honour hostalloc_maxbonus_variation hostalloc_bonus_previousfail hostalloc_bonus_sharereuse and make them default to their previous values. These should be set as `synth' runvars during flight construction, so that they are not copied into flights generated by cs-bisection-step or cs-adjust-flight. cs-bisection-step makes its own arrangements for host specification. So should the caller of cs-adjust-flight (perhaps via the blessing system). Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- v2: Incorporate note about `synth'-ness in commit message. --- ts-hosts-allocate-Executive | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index 781ddaf..eafcce2 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -541,14 +541,19 @@ sub hid_recurse ($$) { my $log_variation_age = log(1+$variation_age/86400); my $variation_bonus = $log_variation_age * 3600*2; - my $max_variation_bonus = 12*3600; + my $max_variation_bonus = $r{hostalloc_maxbonus_variation} // 12*3600; $variation_bonus=$max_variation_bonus if $variation_bonus>$max_variation_bonus; + my $prevfail_bonus = $r{hostalloc_bonus_previousfail} // 7.0*86400; + my $prevfail_equiv_bonus = $prevfail_bonus * (6.5 / 7.0); + + my $share_reuse_bonus = $r{hostalloc_bonus_sharereuse} // 10000; + my $cost= $start_time + $duration_for_cost - - ($previously_failed ==@hids ? 7*86400 : - $previously_failed_equiv==@hids ? 6.5*86400 : + - ($previously_failed ==@hids ? $prevfail_bonus : + $previously_failed_equiv==@hids ? $prevfail_equiv_bonus : # We wait 7d extra to try a failing test on the same # hardware, or 6.5d on `equivalent' hardware (as defined by # equiv-* flags). Compared to `equivalent' hardware, we @@ -556,7 +561,7 @@ sub hid_recurse ($$) { 0) + ($previously_failed || $previously_failed_equiv ? (-$max_variation_bonus+$variation_bonus) : -$variation_bonus) - - $share_reuse * 10000; + - $share_reuse * $share_reuse_bonus; print DEBUG "$dbg FINAL start=$start_time va=$variation_age". " variation_bonus=$variation_bonus". -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |