From nobody Mon Feb 9 22:24:20 2026 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1559039686; cv=none; d=zoho.com; s=zohoarc; b=Mw9K6jdMUymh5OHqPxf5NRVKpYCtOxLWbCCpa5sHoAUWzMSU5GxrI3x3kMqmnPDqyOzxm9YS560PwkwRkIrRVpZm+X9kf1ZnTwVyU5P0V3XutReHYzLOf9vctOOVQZJs2XUe5q44UsYlvMYRtTDUXMC/oJIDYcFNmi6PyNUn/CU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559039686; h=Content-Type: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:ARC-Authentication-Results; bh=5sclKBTYbpVXUwUKqgLF1cVpiuS3/dsH8xKYJda2D4k=; b=Ph9y7M4q1Q7PP0jJAs8uxCjLGawZjd/7zFBWtr2EWiSYdiS0xlHhI1xTqXl09YcahqiZ32DOg6/Qgdd2Z8K5oRy06mbDNOb1hHkQZE3Q7WN9m88DZvenEpd7WiQHHaa9w3Zh2Y/ogOyWd+qg/SmonktDu2/IGMd1tJel1QhToKs= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1559039686638804.1885379658385; Tue, 28 May 2019 03:34:46 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hVZQ9-0004io-8L; Tue, 28 May 2019 10:33:29 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hVZQ5-0004bz-N2 for xen-devel@lists.xenproject.org; Tue, 28 May 2019 10:33:25 +0000 Received: from mx1.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 03ff6e8e-8134-11e9-9e47-9f4e629b93b1; Tue, 28 May 2019 10:33:22 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 85970B035; Tue, 28 May 2019 10:33:20 +0000 (UTC) X-Inumbo-ID: 03ff6e8e-8134-11e9-9e47-9f4e629b93b1 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Tue, 28 May 2019 12:32:28 +0200 Message-Id: <20190528103313.1343-16-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 15/60] xen/sched: add domain pointer to struct sched_unit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Tim Deegan , Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Dario Faggioli , Julien Grall , Jan Beulich MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Add a pointer to the domain to struct sched_unit in order to avoid having to dereference the vcpu pointer of struct sched_unit to find the related domain. Signed-off-by: Juergen Gross --- xen/common/schedule.c | 3 ++- xen/include/xen/sched.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 78d9108956..61c8e1252f 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -253,7 +253,7 @@ static void sched_spin_unlock_double(spinlock_t *lock1,= spinlock_t *lock2, static void sched_free_unit(struct sched_unit *unit) { struct sched_unit *prev_unit; - struct domain *d =3D unit->vcpu->domain; + struct domain *d =3D unit->domain; =20 if ( d->sched_unit_list =3D=3D unit ) d->sched_unit_list =3D unit->next_in_list; @@ -289,6 +289,7 @@ static struct sched_unit *sched_alloc_unit(struct vcpu = *v) =20 v->sched_unit =3D unit; unit->vcpu =3D v; + unit->domain =3D d; =20 for ( prev_unit =3D &d->sched_unit_list; *prev_unit; prev_unit =3D &(*prev_unit)->next_in_list ) diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 13c99a9194..0b927fdd55 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -261,6 +261,7 @@ struct vcpu struct sched_resource; =20 struct sched_unit { + struct domain *domain; struct vcpu *vcpu; void *priv; /* scheduler private data */ struct sched_unit *next_in_list; --=20 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel