|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 16/60] xen/sched: add id to struct sched_unit
Add an identifier to sched_unit. For now it will be the same as the
related vcpu_id.
Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
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 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;
--
2.16.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |