From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH 19/27] ts-host-alloc-Executive: Honour various hostalloc_* runvars Date: Wed, 16 Sep 2015 14:35:22 +0100 Message-ID: <1442410530-9665-20-git-send-email-ian.jackson@eu.citrix.com> References: <1442410530-9665-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZcCsR-0000rc-VV for xen-devel@lists.xenproject.org; Wed, 16 Sep 2015 13:36:00 +0000 In-Reply-To: <1442410530-9665-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org We honour hostalloc_maxbonus_variation hostalloc_bonus_previousfail hostalloc_bonus_sharereuse and make them default to their previous values. Signed-off-by: Ian Jackson --- 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