From nobody Mon Feb 9 10:12:13 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=1555605180; cv=none; d=zoho.com; s=zohoarc; b=BGpYhhrswYPyf5OeF64sXkAo7U+ABEWcW3NkKBOZYOgxrhcaXlDtj3vW+yLN285BKlvo0YsyD2gazxOYJKWtqjIH8h3BK7n3Ot2XH34kNNFmyBjEMM6g01cicIu73F8Fa6Kd9zUwjTs9UQFF9lW8DwrGT+4+Z0Mtsi0ImHB2lHE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605180; 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=FXn3XrvYTAgVFPQ49Ywl+Cu3T+9sxNAoSAveQE7Xpa8=; b=QF4AfsDE3haDoSrfq29YV8i6g3rM8PNgrFA/MOsQIwW9BWcxSvokKkdy0NT6BE0PhdW310siP2CR30Z3iDAEOD6FwlkaRphwlGwcNlpar3/4P96RRIohjSjBERaNPlwUKR9JQetw7b0kg3WLGoXraLgIdJTJOmewiSX0/hTsSbQ= 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 1555605180685449.37263029005464; Thu, 18 Apr 2019 09:33:00 -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 1hH9xR-0002BY-9b; Thu, 18 Apr 2019 16:32:17 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xP-00028E-Jx for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:15 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 85b12970-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:14 +0000 (UTC) X-Inumbo-ID: 85b12970-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913798" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:54 +0100 Message-ID: <20190418163158.11408-18-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 17/21] starvation: Use "starved" for hostalloc_maxwait_max 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" Previously this was "broken". We mustn't just call `broken' inside attempt_allocation because that runs in a db transaction. Instead, we arrange that attempt_allocation returns 2, which threads its way back out to the return value from alloc_resources, and then call broken there. Signed-off-by: Ian Jackson --- ts-hosts-allocate-Executive | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index 3425c8ce..8c9ddaf7 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -683,12 +683,17 @@ sub alloc_hosts () { ? -10000 : -10 * @hids; =20 - alloc_resources(WaitStart =3D> + my $ok =3D alloc_resources(WaitStart =3D> ($ENV{OSSTEST_RESOURCE_WAITSTART} || $fi->{started}), WaitStartAdjust =3D> $waitstartadjust, DebugFh =3D> \*DEBUG, \&attempt_allocation); =20 + if ($ok=3D=3D2) { + broken "starved or timed out", 'starved'; + } + die $ok unless $ok=3D=3D1; + foreach my $hid (@hids) { my $sel=3D $hid->{Selected}; die $hid->{Ident} unless defined $sel->{resname}; @@ -764,9 +769,11 @@ sub attempt_allocation { # * 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; - die "timed out: $wait_sofar, $best->{Start}, $maxwait" - if $wait_sofar > $maxwait/2 - && $wait_sofar + $best->{Start} > $maxwait; + if ($wait_sofar > $maxwait/2 + && $wait_sofar + $best->{Start} > $maxwait) { + logm "timed out: $wait_sofar, $best->{Start}, $maxwait"; + return 2; + } } } =20 --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel