From patchwork Sat Mar 12 11:34:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 8571381 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 420359F758 for ; Sat, 12 Mar 2016 11:36:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6162A20373 for ; Sat, 12 Mar 2016 11:36:48 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 6CA772035E for ; Sat, 12 Mar 2016 11:36:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1aehoB-00062h-8Y; Sat, 12 Mar 2016 11:34:11 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1aeho9-000629-T9 for xen-devel@lists.xenproject.org; Sat, 12 Mar 2016 11:34:09 +0000 Received: from [193.109.254.147] by server-2.bemta-14.messagelabs.com id 84/39-03301-0BEF3E65; Sat, 12 Mar 2016 11:34:08 +0000 X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-15.tower-27.messagelabs.com!1457782447!30669830!1 X-Originating-IP: [74.125.82.66] X-SpamReason: No, hits=0.2 required=7.0 tests=RCVD_ILLEGAL_IP X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 18524 invoked from network); 12 Mar 2016 11:34:08 -0000 Received: from mail-wm0-f66.google.com (HELO mail-wm0-f66.google.com) (74.125.82.66) by server-15.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 12 Mar 2016 11:34:08 -0000 Received: by mail-wm0-f66.google.com with SMTP id n205so6708010wmf.2 for ; Sat, 12 Mar 2016 03:34:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:from:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=8/xpg/WiO4/acro0CAD9gQBcUbHmm0RMdHvGvFUXoaI=; b=HqtObmPKy/CH2tzjJz4umtHy/0oINVuxbk2Qu/XCiAXmMHTEVgtambjtwOBc4vU7Jo 7hkaj39t4uFBwO4ZAprD1KXZJ6igICSEHVd64Zoq+Xjxs6RtFAJVcgJdxtlgDtb6Okzt oL5J1fI7FU40nocz7OKwbFYCIr9KgMVBmg53Fe5TbzFC8o1sNXHQinNqZn8V+oPa0oKx e3SmVMRt9mT9iJs8HyReeyb7qSC/6us4XW2pm0xRkfNu3Cg3YXP0vgT2vEWx57xhKR7U CpPjAs/DpRd8sD6NX210GtBWfSK3nvlimTPv5g8X9CSCMo7Nm1nMs0fug9a89XeXD7Td ozHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:from:to:cc:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=8/xpg/WiO4/acro0CAD9gQBcUbHmm0RMdHvGvFUXoaI=; b=jZweHZuTF6HxysBy00nMdjBnh14XgI3597PzmX0tDr4Eih3tqp5YwBasa7ei1p8KxK tUcJ3dNiSe8nlGn8ly0RZ1XeemgBAcJqslZq62gF/+VOeraJsbu7C5ZR/W9RKw5fMpLA 3veTNm87PWxnxiCa/zE+MAEFcMsotV61J1BRF7aOmS6t7Z3z6D5Q0+ZKwxQfEUFWPGko wJrCQ7kXsGKKjPfACOklf9Ste011mnpy+WypuTtbeUhvngGMqER7IOKtnIFjCph9e68J oUDjqoYU1+z3sg3TPDfbPIiCzGl3V00JN5LNxDpd4ex71n4Za7aBOvW2OvNfOmlu6Jfl FhEg== X-Gm-Message-State: AD7BkJKP8P9rqQ2n8QpboCOMqHjCM3PBme2W9z9aMMPkwMVfjbPdzS6aMERvLV8hoQu6/Q== X-Received: by 10.28.48.136 with SMTP id w130mr8054963wmw.54.1457782447712; Sat, 12 Mar 2016 03:34:07 -0800 (PST) Received: from Solace.station (net-2-35-170-8.cust.vodafonedsl.it. [2.35.170.8]) by smtp.gmail.com with ESMTPSA id w133sm6591126wmd.3.2016.03.12.03.34.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Mar 2016 03:34:06 -0800 (PST) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Sat, 12 Mar 2016 12:34:05 +0100 Message-ID: <20160312113405.14480.20446.stgit@Solace.station> In-Reply-To: <20160312112621.14480.21747.stgit@Solace.station> References: <20160312112621.14480.21747.stgit@Solace.station> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Cc: George Dunlap , Meng Xu Subject: [Xen-devel] [PATCH 2/3] xen: sched RTDS: use uint64_t for tracing time values 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-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP such as deadline and budget. Packing is necessary to make it possible for xentrace_format to properly interpreet the records. Signed-off-by: Dario Faggioli Reviewed-by: Meng Xu --- Cc: George Dunlap Cc: Meng Xu --- xen/common/sched_rt.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c index bfed2e2..8e51abe 100644 --- a/xen/common/sched_rt.c +++ b/xen/common/sched_rt.c @@ -361,17 +361,14 @@ rt_update_deadline(s_time_t now, struct rt_vcpu *svc) /* TRACE */ { - struct { + struct __packed { unsigned vcpu:16, dom:16; - unsigned cur_deadline_lo, cur_deadline_hi; - unsigned cur_budget_lo, cur_budget_hi; + uint64_t cur_deadline, cur_budget; } d; d.dom = svc->vcpu->domain->domain_id; d.vcpu = svc->vcpu->vcpu_id; - d.cur_deadline_lo = (unsigned) svc->cur_deadline; - d.cur_deadline_hi = (unsigned) (svc->cur_deadline >> 32); - d.cur_budget_lo = (unsigned) svc->cur_budget; - d.cur_budget_hi = (unsigned) (svc->cur_budget >> 32); + d.cur_deadline = (uint64_t) svc->cur_deadline; + d.cur_budget = (uint64_t) svc->cur_budget; trace_var(TRC_RTDS_BUDGET_REPLENISH, 1, sizeof(d), (unsigned char *) &d); @@ -711,16 +708,14 @@ burn_budget(const struct scheduler *ops, struct rt_vcpu *svc, s_time_t now) /* TRACE */ { - struct { + struct __packed { unsigned vcpu:16, dom:16; - unsigned cur_budget_lo; - unsigned cur_budget_hi; + uint64_t cur_budget; int delta; } d; d.dom = svc->vcpu->domain->domain_id; d.vcpu = svc->vcpu->vcpu_id; - d.cur_budget_lo = (unsigned) svc->cur_budget; - d.cur_budget_hi = (unsigned) (svc->cur_budget >> 32); + d.cur_budget = (uint64_t) svc->cur_budget; d.delta = delta; trace_var(TRC_RTDS_BUDGET_BURN, 1, sizeof(d), @@ -763,17 +758,14 @@ __runq_pick(const struct scheduler *ops, const cpumask_t *mask) { if( svc != NULL ) { - struct { + struct __packed { unsigned vcpu:16, dom:16; - unsigned cur_deadline_lo, cur_deadline_hi; - unsigned cur_budget_lo, cur_budget_hi; + uint64_t cur_deadline, cur_budget; } d; d.dom = svc->vcpu->domain->domain_id; d.vcpu = svc->vcpu->vcpu_id; - d.cur_deadline_lo = (unsigned) svc->cur_deadline; - d.cur_deadline_hi = (unsigned) (svc->cur_deadline >> 32); - d.cur_budget_lo = (unsigned) svc->cur_budget; - d.cur_budget_hi = (unsigned) (svc->cur_budget >> 32); + d.cur_deadline = (uint64_t) svc->cur_deadline; + d.cur_budget = (uint64_t) svc->cur_budget; trace_var(TRC_RTDS_RUNQ_PICK, 1, sizeof(d), (unsigned char *) &d);