From nobody Tue Nov 4 11:33:00 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1602095294; cv=none; d=zohomail.com; s=zohoarc; b=Sdm2Mj0PFlrJ+drUTe1AjgpLGP7IJPJcvQRgyITYOsSYBXZ2nspfNhKCelJHfqZ3vTETC9blR3bRZn9jzSb8I4Fkt+BV6+pHxb6h+42cZCbPNCDAJVJlPpvz37d80ggDNgMF7iK4a0sfniKwu+Kkn+8TZM4gQ/O6P1ORPTEmteY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602095294; h=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; bh=tBFLpEpFdCtdcB8TfbRtxzunzSRUxMHq9ElAgQFuoCw=; b=n2Hpih1hzpYjV4segZp9vxWWx1aEwB31rjkgnRl+qd/giAWwLfP4LuggyImlDvACze1hOBStkPBYGeXba9/G2ldT8UI+qQ3paP3nuppBiF2HGx/NWLUW9ju9Uz39zRQ5AWnsfrGyfKS6MXg94ILLslVLsWqfMNvZITRTp6lXQOs= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1602095294270590.8992708260337; Wed, 7 Oct 2020 11:28:14 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.3709.11071 (Exim 4.92) (envelope-from ) id 1kQEAO-0003zw-Hl; Wed, 07 Oct 2020 18:27:56 +0000 Received: by outflank-mailman (output) from mailman id 3709.11071; Wed, 07 Oct 2020 18:27:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAO-0003zT-3y; Wed, 07 Oct 2020 18:27:56 +0000 Received: by outflank-mailman (input) for mailman id 3709; Wed, 07 Oct 2020 18:27:55 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4S-00072Q-Lc for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:48 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ddcc62eb-6ded-4054-be0f-ede0730b6969; Wed, 07 Oct 2020 18:20:19 +0000 (UTC) Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by chiark.greenend.org.uk (Debian Exim 4.84_2 #1) with esmtp (return-path ijackson@chiark.greenend.org.uk) id 1kQDk2-0007CF-1d; Wed, 07 Oct 2020 19:00:42 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4S-00072Q-Lc for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:48 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ddcc62eb-6ded-4054-be0f-ede0730b6969; Wed, 07 Oct 2020 18:20:19 +0000 (UTC) Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by chiark.greenend.org.uk (Debian Exim 4.84_2 #1) with esmtp (return-path ijackson@chiark.greenend.org.uk) id 1kQDk2-0007CF-1d; Wed, 07 Oct 2020 19:00:42 +0100 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ddcc62eb-6ded-4054-be0f-ede0730b6969 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 34/82] plan_search: Track last sharing state to determine $share_reuse Date: Wed, 7 Oct 2020 18:59:36 +0100 Message-Id: <20201007180024.7932-35-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Ian Jackson What matters for the purpose of $share_reuse is not whether the host is actually being _shared_ (ie, there are other concurrent allocations and therefore a concurrent Event with Share information). What we really want to know is whether the *last* use of this host was a suitable sharing setup - because we actually want to know if we will be able to skip our setup. So track that explicitly. (The slightly odd structure, where there are two loops in one, means that we reset $last_eshare when we go onto the next $req ie the next host to check.) Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index 4083ae6b..5f59c44e 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -676,6 +676,7 @@ sub plan_search ($$$$) { my $try_time=3D 0; my $confirmedok=3D 0; my $share_reuse=3D 0; + my $last_eshare; =20 for (;;) { my $req=3D $requestlist->[$reqix]; @@ -715,6 +716,10 @@ sub plan_search ($$$$) { # this period is entirely after the proposed slot; # so no need to check this or any later periods =20 + $last_eshare =3D $startevt->{ + $startevt->{Type} eq 'Unshare' ? 'PreviousShare' : 'Share' + }; + next PERIOD if $endevt->{Time} <=3D $try_time; # this period is entirely before the proposed slot; # it doesn't overlap, but must check subsequent periods @@ -743,9 +748,10 @@ sub plan_search ($$$$) { " try=3D$try_time confirmed=3D$confirmedok reuse=3D$share_reuse"); =20 $confirmedok++; - $share_reuse++ if defined $share_wear; + $share_reuse++ if $last_eshare and $share_compat_ok->($last_eshare); $reqix++; $reqix %=3D @$requestlist; + undef $last_eshare; last if $confirmedok=3D=3D@$requestlist; } =20 --=20 2.20.1