From nobody Mon Feb 9 16:12:41 2026 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605177; cv=none; d=zoho.com; s=zohoarc; b=DPe5FTbGbUQvgMAuqViMx89g2T4JbXgEFJ3m1csAs9v4so+RDOHyT8oPFfAltymRypcEbObNIeYpg/L++lwH0PYjoaqY6cffP7HUggM8Dkf6vcSkwvIGcdS1MD2AzuuBzPUVD/uaMr1a2H4LeUWn4OY2jWQeLuCSVMJMa9+MzCI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605177; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=J6kv7PThOSkPoqcqpq18ourK08O2jLkC+KSYyC1l9ro=; b=X6Fds/pHMpoYjvxxyXDtAS7nHIm1wsUsJMMAq76f87N2NZ9AeAwxEfASkfQOypqCBjfcKuxxkFsuuruzR4H1sv2hC/Gupeip3Al8RPV4ivvLCowMt1Tvviyfj8E/hUw5IB2vFkCRVWiUEGImCGlQs3M5vI38wKYz/hRU7YgnDUs= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605177727109.29143754911809; Thu, 18 Apr 2019 09:32:57 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xU-0002HC-2I; Thu, 18 Apr 2019 16:32:20 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xR-0002C3-E8 for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:17 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 86a2232e-61f7-11e9-8634-4356937a26ca; Thu, 18 Apr 2019 16:32:16 +0000 (UTC) X-Inumbo-ID: 86a2232e-61f7-11e9-8634-4356937a26ca X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913807" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:58 +0100 Message-ID: <20190418163158.11408-22-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 21/21] starvation: Better logging/debugging output X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Ian Jackson --- ts-hosts-allocate-Executive | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index b75927c1..64c4c9f9 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -777,8 +777,8 @@ sub most_optimistic ($$$) { return $optimist->{Got}; } =20 -sub starving ($) { - my ($best_start_abs) =3D @_; +sub starving ($$) { + my ($best_start_abs, $now) =3D @_; return (0, 'runvar says never give up') unless %$starvation_p; return (0, 'no estimate') unless defined $best_start_abs; $starvation_q->execute($flight); @@ -801,11 +801,16 @@ sub starving ($) { # to our expected finish is more than the total time so # far (for the completed jobs) by the margin X and I my $X =3D hostalloc_starvation_calculate_X($starvation_p, $w, $d); - return (0, 'X=3Dinf') unless defined $X; + return (0, "D=3D$d W=3D$w X=3Dinf") unless defined $X; my $total_d =3D $maxfin - $fi->{started}; my $projected_me =3D $best_start_abs - $fi->{started}; - my $m =3D "D=3D$d W=3D$w X=3D$X maxfin=3D$maxfin"; - my $bad =3D $projected_me > $X * $total_d + $starvation_p->{I}; + my $lim =3D $X * $total_d + $starvation_p->{I}; + my $Xcmp =3D ($projected_me - $starvation_p->{I}) / $total_d; + my $m =3D sprintf + "D=3D%d W=3D%d X=3D%.3f t_D=3D%s t_me=3D%s t_lim=3D%.3f X'=3D%.4f (fi.s= =3D%s)", + $d, $w, $X, $total_d, $projected_me, $lim, $Xcmp, + $fi->{started} - $now; + my $bad =3D $projected_me > $lim; return ($bad, $m); } =20 @@ -876,7 +881,7 @@ sub attempt_allocation { } } elsif (%$starvation_p) { my $est_abs =3D most_optimistic($best, $now, $starvation_p->{I}); - my ($starving, $m) =3D starving($est_abs); + my ($starving, $m) =3D starving($est_abs, $now); $starvation_q->finish(); if (!$starving) { print DEBUG "not starving: $m\n"; --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel