Message ID | 20190528103313.1343-17-jgross@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <xen-devel-bounces@lists.xenproject.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AA0E0112C for <patchwork-xen-devel@patchwork.kernel.org>; Tue, 28 May 2019 10:35:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BF5C2857D for <patchwork-xen-devel@patchwork.kernel.org>; Tue, 28 May 2019 10:35:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90664287EF; Tue, 28 May 2019 10:35:08 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4364D2857D for <patchwork-xen-devel@patchwork.kernel.org>; Tue, 28 May 2019 10:35:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1hVZQ5-0004c7-N2; Tue, 28 May 2019 10:33:25 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from <SRS0=31/0=T4=suse.com=jgross@srs-us1.protection.inumbo.net>) id 1hVZQ3-0004Z6-Oy for xen-devel@lists.xenproject.org; Tue, 28 May 2019 10:33:23 +0000 X-Inumbo-ID: 0406d6a0-8134-11e9-8980-bc764e045a96 Received: from mx1.suse.de (unknown [195.135.220.15]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 0406d6a0-8134-11e9-8980-bc764e045a96; Tue, 28 May 2019 10:33:22 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id CE941AE8D; Tue, 28 May 2019 10:33:20 +0000 (UTC) From: Juergen Gross <jgross@suse.com> To: xen-devel@lists.xenproject.org Date: Tue, 28 May 2019 12:32:29 +0200 Message-Id: <20190528103313.1343-17-jgross@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190528103313.1343-1-jgross@suse.com> References: <20190528103313.1343-1-jgross@suse.com> Subject: [Xen-devel] [PATCH 16/60] xen/sched: add id to struct sched_unit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion <xen-devel.lists.xenproject.org> List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=unsubscribe> List-Post: <mailto:xen-devel@lists.xenproject.org> List-Help: <mailto:xen-devel-request@lists.xenproject.org?subject=help> List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=subscribe> Cc: Juergen Gross <jgross@suse.com>, Tim Deegan <tim@xen.org>, Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>, George Dunlap <george.dunlap@eu.citrix.com>, Andrew Cooper <andrew.cooper3@citrix.com>, Ian Jackson <ian.jackson@eu.citrix.com>, Dario Faggioli <dfaggioli@suse.com>, Julien Grall <julien.grall@arm.com>, Jan Beulich <jbeulich@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" <xen-devel-bounces@lists.xenproject.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
xen: add core scheduling support
|
expand
|
diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 61c8e1252f..d1c706186f 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -289,12 +289,13 @@ static struct sched_unit *sched_alloc_unit(struct vcpu *v) v->sched_unit = unit; unit->vcpu = v; + unit->unit_id = v->vcpu_id; unit->domain = d; for ( prev_unit = &d->sched_unit_list; *prev_unit; prev_unit = &(*prev_unit)->next_in_list ) if ( (*prev_unit)->next_in_list && - (*prev_unit)->next_in_list->vcpu->vcpu_id > v->vcpu_id ) + (*prev_unit)->next_in_list->unit_id > unit->unit_id ) break; unit->next_in_list = *prev_unit; diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 0b927fdd55..c76b81ebef 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -266,6 +266,7 @@ struct sched_unit { void *priv; /* scheduler private data */ struct sched_unit *next_in_list; struct sched_resource *res; + int unit_id; /* Last time when unit has been scheduled out. */ uint64_t last_run_time;
Add an identifier to sched_unit. For now it will be the same as the related vcpu_id. Signed-off-by: Juergen Gross <jgross@suse.com> --- xen/common/schedule.c | 3 ++- xen/include/xen/sched.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)