From patchwork Tue Aug 1 18:33:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Meng Xu X-Patchwork-Id: 9875227 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 726C860365 for ; Tue, 1 Aug 2017 18:37:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69A7428047 for ; Tue, 1 Aug 2017 18:37:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E74828726; Tue, 1 Aug 2017 18:37:06 +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 DE3A528047 for ; Tue, 1 Aug 2017 18:37:05 +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 1dcbzw-0007QJ-K7; Tue, 01 Aug 2017 18:34:28 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcbzv-0007QC-CX for xen-devel@lists.xenproject.org; Tue, 01 Aug 2017 18:34:27 +0000 Received: from [85.158.143.35] by server-5.bemta-6.messagelabs.com id CB/3A-03368-2B9C0895; Tue, 01 Aug 2017 18:34:26 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrELMWRWlGSWpSXmKPExsUyr8m9UXfTyYZ IgwOn+Cy+b5nM5MDocfjDFZYAxijWzLyk/IoE1ox/0/YwFezkrfgz+w5bA+NOri5GLg4hgRlM Eh2zP7N3MXJysAmoSBzf8IgVxBYRUJK4t2oyE0gRs8BGRolJE/8CFXFwCAtESEzfygRSwyKgK rHi9xQwm1fAWWLBhveMILaEgJzEyWOTWUHKOQVcJM4/8wcJCwGVTGi8zQpREiqxZvF5Jpjyxw 8fME5g5FnAyLCKUb04tagstUjXTC+pKDM9oyQ3MTNH19DATC83tbg4MT01JzGpWC85P3cTI9D nDECwg3HeCf9DjJIcTEqivIo99ZFCfEn5KZUZicUZ8UWlOanFhxhlODiUJHjrTzRECgkWpaan VqRl5gCDDyYtwcGjJMJrAZLmLS5IzC3OTIdInWI05tiwev0XJo5XE/5/YxJiycvPS5US52UAK RUAKc0ozYMbBIuKS4yyUsK8jECnCfEUpBblZpagyr9iFOdgVBLmTQWZwpOZVwK37xXQKUxAp0 iW1oKcUpKIkJJqYDw4n/3JSk+jTetzxP85T16m2lrw+FtR2TmFEzcNrjVtWDHT8srv6Twxi7t vWDT/lhco/Dlto6ntpyqmXfP2FAVrGNyY2fvZXNrqatq2bzcU3hrKB/su+d549Pr6Y/ahm/pM djp132KPeMm31O3UVY/JUcqX2g+vuxIw+yBX9s0zU1lMT5UUHihVYinOSDTUYi4qTgQA0qteW IUCAAA= X-Env-Sender: mengxu@cis.upenn.edu X-Msg-Ref: server-6.tower-21.messagelabs.com!1501612465!52958363!1 X-Originating-IP: [158.130.71.129] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 4904 invoked from network); 1 Aug 2017 18:34:26 -0000 Received: from renard.seas.upenn.edu (HELO fox.seas.upenn.edu) (158.130.71.129) by server-6.tower-21.messagelabs.com with SMTP; 1 Aug 2017 18:34:26 -0000 Received: from panda-catbroadwell.cis.upenn.edu (SEASnet-48-12.cis.upenn.edu [158.130.48.13]) (authenticated bits=0) by fox.seas.upenn.edu (8.15.2/8.14.5) with ESMTPSA id v71IYCTw021653 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT); Tue, 1 Aug 2017 14:34:18 -0400 From: Meng Xu To: xen-devel@lists.xenproject.org Date: Tue, 1 Aug 2017 14:33:52 -0400 Message-Id: <1501612434-5803-2-git-send-email-mengxu@cis.upenn.edu> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1501612434-5803-1-git-send-email-mengxu@cis.upenn.edu> References: <1501612434-5803-1-git-send-email-mengxu@cis.upenn.edu> X-Proofpoint-Virus-Version: vendor=nai engine=5600 definitions=5800 signatures=585085 X-Proofpoint-Spam-Reason: safe Cc: wei.liu2@citrix.com, george.dunlap@eu.citrix.com, dario.faggioli@citrix.com, ian.jackson@eu.citrix.com, xumengpanda@gmail.com, Meng Xu Subject: [Xen-devel] [PATCH RFC v1 1/3] xen:rtds: enable XL to set and get vcpu work conserving flag 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: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Extend the hypercalls(XEN_DOMCTL_SCHEDOP_getvcpuinfo/putvcpuinfo) to get/set a domain's per-VCPU work conserving parameters. Signed-off-by: Meng Xu --- xen/common/sched_rt.c | 2 ++ xen/include/public/domctl.h | 1 + 2 files changed, 3 insertions(+) diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c index 740a712..76ed4cb 100644 --- a/xen/common/sched_rt.c +++ b/xen/common/sched_rt.c @@ -1442,6 +1442,7 @@ rt_dom_cntl( svc = rt_vcpu(d->vcpu[local_sched.vcpuid]); local_sched.u.rtds.budget = svc->budget / MICROSECS(1); local_sched.u.rtds.period = svc->period / MICROSECS(1); + local_sched.u.rtds.is_work_conserving = svc->is_work_conserving; spin_unlock_irqrestore(&prv->lock, flags); if ( copy_to_guest_offset(op->u.v.vcpus, index, @@ -1466,6 +1467,7 @@ rt_dom_cntl( svc = rt_vcpu(d->vcpu[local_sched.vcpuid]); svc->period = period; svc->budget = budget; + svc->is_work_conserving = local_sched.u.rtds.is_work_conserving; spin_unlock_irqrestore(&prv->lock, flags); } /* Process a most 64 vCPUs without checking for preemptions. */ diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index ff39762..e67cd9e 100644 --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -360,6 +360,7 @@ typedef struct xen_domctl_sched_credit2 { typedef struct xen_domctl_sched_rtds { uint32_t period; uint32_t budget; + bool is_work_conserving; } xen_domctl_sched_rtds_t; typedef struct xen_domctl_schedparam_vcpu {