[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH RFC 20/49] xen/sched: add id to struct sched_item



Add an identifier to sched_item. 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-if.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index 625d6287c2..7a7ec56402 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -293,12 +293,13 @@ static struct sched_item *sched_alloc_item(struct vcpu *v)
 
     v->sched_item = item;
     item->vcpu = v;
+    item->item_id = v->vcpu_id;
     item->domain = d;
 
     for ( prev_item = &d->sched_item_list; *prev_item;
           prev_item = &(*prev_item)->next_in_list )
         if ( (*prev_item)->next_in_list &&
-             (*prev_item)->next_in_list->vcpu->vcpu_id > v->vcpu_id )
+             (*prev_item)->next_in_list->item_id > item->item_id )
             break;
 
     item->next_in_list = *prev_item;
diff --git a/xen/include/xen/sched-if.h b/xen/include/xen/sched-if.h
index 9a524014d0..1e4a7e1e64 100644
--- a/xen/include/xen/sched-if.h
+++ b/xen/include/xen/sched-if.h
@@ -55,6 +55,7 @@ struct sched_item {
     void                  *priv;      /* scheduler private data */
     struct sched_item     *next_in_list;
     struct sched_resource *res;
+    int                    item_id;
 
     /* Last time when item 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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.