From patchwork Thu Oct 6 12:14:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 9364671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9617E6077E for ; Thu, 6 Oct 2016 12:16:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8526B28F8B for ; Thu, 6 Oct 2016 12:16:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7626B28F8E; Thu, 6 Oct 2016 12:16:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8903C28F89 for ; Thu, 6 Oct 2016 12:16:45 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bs7ZZ-0007Pw-Q3; Thu, 06 Oct 2016 12:14:49 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bs7ZZ-0007Pm-9j for xen-devel@lists.xenproject.org; Thu, 06 Oct 2016 12:14:49 +0000 Received: from [85.158.139.211] by server-6.bemta-5.messagelabs.com id 7D/1A-06971-83046F75; Thu, 06 Oct 2016 12:14:48 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpgkeJIrShJLcpLzFFi42JxWrrBXtfC4Vu 4wYKHbBbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8bcK1kFh9krLq9uZW5gnM/axcjBISHgL/H9 f0oXIycHm4CuRNOWv2wgYREBFYnbew1ATGaBUIkdLyxBKoQFvCReH+tnBbFZgCrmvvrHBGLzC nhITJr7hQ3ElhCQkzh//CczSKuQgJrE3PXxECWCEidnPmEBsZkFJCQOvnjBDFHOLXH79FTmCY w8s5CUzUJStoCRaRWjRnFqUVlqka6RqV5SUWZ6RkluYmaOrqGBqV5uanFxYnpqTmJSsV5yfu4 mRmBo1DMwMO5g3NXud4hRkoNJSZR3PdO3cCG+pPyUyozE4oz4otKc1OJDjDIcHEoSvDfsgHKC RanpqRVpmTnAIIVJS3DwKInwRtkDpXmLCxJzizPTIVKnGHU5Fvy4vZZJiCUvPy9VSpz3M8gMA ZCijNI8uBGwiLnEKCslzMvIwMAgxFOQWpSbWYIq/4pRnINRSZi3HmQKT2ZeCdymV0BHMAEdkb /0C8gRJYkIKakGxpJ1tjVKOny5P38EatdfXlCzWvvzp13zvr258nPa7Y6TH/tTTVZkxf3t0fc Rn/d8deHiR7HxvVzGavqrWU+2tkft9FdU+cHhvf7l64TA8p2n9rhxvdkSLiLCLfbBtTHklW9R xBeBun0Nk+YGNgfd4ClSZZb6n1/SflNQvezDh6a2letN3P3tlFiKMxINtZiLihMB/8iIRJMCA AA= X-Env-Sender: prvs=0807beae1=Ian.Jackson@citrix.com X-Msg-Ref: server-16.tower-206.messagelabs.com!1475756086!47642867!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 3488 invoked from network); 6 Oct 2016 12:14:47 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-16.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 6 Oct 2016 12:14:47 -0000 X-IronPort-AV: E=Sophos;i="5.31,453,1473120000"; d="scan'208";a="391054229" From: Ian Jackson To: Date: Thu, 6 Oct 2016 13:14:23 +0100 Message-ID: <1475756065-5242-1-git-send-email-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Jackson Subject: [Xen-devel] [OSSTEST PATCH 1/3] ms-planner: Ignore freely-shareable resources X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Resource shares with no resource_sharing entry are freely shareable and do not need the planning system. Indeed, they currently break the planner. Signed-off-by: Ian Jackson --- ms-planner | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ms-planner b/ms-planner index bce6e13..8106544 100755 --- a/ms-planner +++ b/ms-planner @@ -71,6 +71,12 @@ sub allocations ($$) { ON owntaskid = taskid WHERE NOT (tasks.type='magic' AND tasks.refkey='allocatable') + AND NOT (resources.restype like 'share-%' + AND NOT EXISTS ( + SELECT 1 FROM resource_sharing sh + WHERE sh.restype = substring(resources.restype from 7) + AND sh.resname = resources.resname + )) END $resources_q->execute(); while (my $row= $resources_q->fetchrow_hashref()) {