From nobody Mon Feb 9 19:08:09 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=1555605205; cv=none; d=zoho.com; s=zohoarc; b=Zhbcxnggb+7qI0OwEWy0A/VMVaJcpfiUd3YuTzLEQYM+Q6n+hXsBztgJEbAxMzCOPVrnwwgZpzt7wvFo1rY0A2LZxmL5OBuLkCBWYYGeuUxyMQRN0oYGEGGU09N6d/2sJYqg7QiJbkNnYQScAu5F3vC9O/T3R8C7EE8zBeFYawg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605205; 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=cm8vSSCs8/Z1RGyCXz+Gt5xnP9brhQwiQAdLZ/x4Ea8=; b=cOCY6AgI4mUfDDAt8hm66xTi7SxUMF6pata2U3BzaH9t4jsWszsLR4EuNiCKqPMnG9YZYG3dxarUthscVj2UBDNx7gqiDLsXcLwAG2gQzC9TPuxQtvcek/nlaB78y3/D+W4o2Fp9nlSMfIk8yon0t58cXgIXmtXwp0stiFpaN6E= 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 1555605205221755.3525139815713; Thu, 18 Apr 2019 09:33:25 -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 1hH9xP-00029C-Q1; Thu, 18 Apr 2019 16:32:15 +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 1hH9xN-000268-UX for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:13 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 843157fe-61f7-11e9-a093-d366d8b4972d; Thu, 18 Apr 2019 16:32:11 +0000 (UTC) X-Inumbo-ID: 843157fe-61f7-11e9-a093-d366d8b4972d X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913789" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:57 +0100 Message-ID: <20190418163158.11408-21-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 20/21] hostalloc_maxwait_max: Use starvation most_optimistic 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" Now that we have a more sophisticated estimate of our likely scheduled time, use it here too. 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 7ea3c4af..b75927c1 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -865,10 +865,15 @@ sub attempt_allocation { # We quit if: # * we have been waiting at least $maxwait/2 # * we estimate it will take at least $maxwait overall - my $wait_sofar =3D $now - $alloc_start_time; - if ($wait_sofar > $maxwait/2 - && $wait_sofar + $best->{Start} > $maxwait) { - logm "timed out: $wait_sofar, $best->{Start}, $maxwait"; + my $est_abs =3D most_optimistic($best, $now, $maxwait/2); + if (defined $est_abs) { + my $wait_sofar =3D $now - $alloc_start_time; + my $wait_exp =3D $est_abs - $alloc_start_time; + if ($wait_exp > $maxwait) { + logm "timed out: $wait_exp > $maxwait ($wait_sofar)", + return 2; + } + } } elsif (%$starvation_p) { my $est_abs =3D most_optimistic($best, $now, $starvation_p->{I}); my ($starving, $m) =3D starving($est_abs); --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel