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

[Xen-changelog] SEDF merge fixes.



ChangeSet 1.1461, 2005/05/09 18:45:01+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        SEDF merge fixes.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 sched_sedf.c |   82 +++++++++++++++++++++++++++++------------------------------
 schedule.c   |    1 
 2 files changed, 41 insertions(+), 42 deletions(-)


diff -Nru a/xen/common/sched_sedf.c b/xen/common/sched_sedf.c
--- a/xen/common/sched_sedf.c   2005-05-09 14:08:53 -04:00
+++ b/xen/common/sched_sedf.c   2005-05-09 14:08:53 -04:00
@@ -120,7 +120,7 @@
        struct list_head extraq[2];
 };
 
-#define EDOM_INFO(d)           ((struct sedf_edom_info *)((d)->ed_sched_priv))
+#define EDOM_INFO(d)           ((struct sedf_edom_info *)((d)->sched_priv))
 #define CPU_INFO(cpu)  ((struct sedf_cpu_info *)schedule_data[cpu].sched_priv)
 #define LIST(d)                        (&EDOM_INFO(d)->list)
 #define EXTRALIST(d,i)         (&(EDOM_INFO(d)->extralist[i]))
@@ -163,7 +163,7 @@
        struct list_head *list = EXTRALIST(d,i);
        ASSERT(extraq_on(d,i));
        PRINT(3, "Removing domain %i.%i from L%i extraq\n", d->domain->id,
-          d->eid, i);  
+          d->id, i);   
        list_del(list);
        list->next = NULL;
        ASSERT(!extraq_on(d, i));
@@ -181,7 +181,7 @@
        
        ASSERT(!extraq_on(d,i));
        PRINT(3, "Adding domain %i.%i (score= %i, short_pen= %lli) to L%i "\
-                "extraq\n", d->domain->id, d->eid, EDOM_INFO(d)->score[i],
+                "extraq\n", d->domain->id, d->id, EDOM_INFO(d)->score[i],
                 EDOM_INFO(d)->short_block_lost_tot, i);        
        /*iterate through all elements to find our "hole" and on our way
          update all the other scores*/
@@ -193,10 +193,10 @@
                else
                        PRINT(4,"\tbehind domain %i.%i (score= %i)\n",
                              curinf->exec_domain->domain->id,
-                             curinf->exec_domain->eid, curinf->score[i]);
+                             curinf->exec_domain->id, curinf->score[i]);
        }
        /*cur now contains the element, before which we'll enqueue*/
-       PRINT(3, "\tlist_add to %x\n", cur->prev);
+       PRINT(3, "\tlist_add to %p\n", cur->prev);
        list_add(EXTRALIST(d,i),cur->prev);
        
        /*continue updating the extraq*/
@@ -206,24 +206,24 @@
                        curinf = list_entry(cur,struct sedf_edom_info,
                                extralist[i]);
                        curinf->score[i] -= sub;
-                       PRINT(4, "\tupdating domain %i.%i (score= %llu)\n",
+                       PRINT(4, "\tupdating domain %i.%i (score= %u)\n",
                              curinf->exec_domain->domain->id, 
-                             curinf->exec_domain->eid, curinf->score[i]);
+                             curinf->exec_domain->id, curinf->score[i]);
                }
        ASSERT(extraq_on(d,i));
 }
 static inline void extraq_check(struct exec_domain *d) {
        if (extraq_on(d, EXTRA_UTIL_Q)) {
-               PRINT(2,"Dom %i.%i is on L1 extraQ\n",d->domain->id, d->eid);
+               PRINT(2,"Dom %i.%i is on L1 extraQ\n",d->domain->id, d->id);
                if (!(EDOM_INFO(d)->status & EXTRA_AWARE) &&
                    !extra_runs(EDOM_INFO(d))) {
                        extraq_del(d, EXTRA_UTIL_Q);
                        PRINT(2,"Removed dom %i.%i from L1 extraQ\n",
-                             d->domain->id, d->eid);
+                             d->domain->id, d->id);
                }
        } else {
                PRINT(2,"Dom %i.%i is NOT on L1 extraQ\n",d->domain->id,
-                     d->eid);
+                     d->id);
                if ((EDOM_INFO(d)->status & EXTRA_AWARE) && sedf_runnable(d))
                {
                        #if (EXTRA == EXTRA_ROUNDR)
@@ -235,7 +235,7 @@
                        ;
                        #endif
                        PRINT(2,"Added dom %i.%i to L1 extraQ\n",d->domain->id,
-                             d->eid);
+                             d->id);
                }
        }
 }
@@ -267,7 +267,7 @@
     struct list_head *list = LIST(d);
     ASSERT(__task_on_queue(d));
     PRINT(3,"Removing domain %i.%i (bop= %llu) from runq/waitq\n", 
d->domain->id,
-          d->eid, PERIOD_BEGIN(EDOM_INFO(d)));
+          d->id, PERIOD_BEGIN(EDOM_INFO(d)));
     list_del(list);
     list->next = NULL;
     ASSERT(!__task_on_queue(d));
@@ -284,7 +284,7 @@
                        break;
        }
        /*cur now contains the element, before which we'll enqueue*/
-       PRINT(3,"\tlist_add to %x\n",cur->prev);
+       PRINT(3,"\tlist_add to %p\n",cur->prev);
        list_add(element, cur->prev);
 }  
 #define DOMAIN_COMPARER(name, field, comp1, comp2)          \
@@ -308,7 +308,7 @@
 static inline void __add_to_waitqueue_sort(struct exec_domain *d) {
        ASSERT(!__task_on_queue(d));
        PRINT(3,"Adding domain %i.%i (bop= %llu) to waitq\n", d->domain->id,
-             d->eid, PERIOD_BEGIN(EDOM_INFO(d)));
+             d->id, PERIOD_BEGIN(EDOM_INFO(d)));
        list_insert_sort(WAITQ(d->processor), LIST(d), waitq_comp);
        ASSERT(__task_on_queue(d));
 }
@@ -321,7 +321,7 @@
 DOMAIN_COMPARER(runq, list, d1->deadl_abs, d2->deadl_abs)
 static inline void __add_to_runqueue_sort(struct exec_domain *d) {
        PRINT(3,"Adding domain %i.%i (deadl= %llu) to runq\n", d->domain->id,
-             d->eid, EDOM_INFO(d)->deadl_abs);
+             d->id, EDOM_INFO(d)->deadl_abs);
        list_insert_sort(RUNQ(d->processor), LIST(d), runq_comp);
 }
 
@@ -346,16 +346,16 @@
 /* Allocates memory for per domain private scheduling data*/
 static int sedf_alloc_task(struct exec_domain *d) {
        PRINT(2,"sedf_alloc_task was called, domain-id %i.%i\n",d->domain->id,
-             d->eid);
+             d->id);
        if (d->domain->sched_priv == NULL) {
                if ((d->domain->sched_priv = 
                     xmalloc(struct sedf_dom_info)) == NULL )
                return -1;
                memset(d->domain->sched_priv, 0, sizeof(struct sedf_dom_info));
        }
-       if ((d->ed_sched_priv = xmalloc(struct sedf_edom_info)) == NULL )
+       if ((d->sched_priv = xmalloc(struct sedf_edom_info)) == NULL )
                return -1;
-       memset(d->ed_sched_priv, 0, sizeof(struct sedf_edom_info));
+       memset(d->sched_priv, 0, sizeof(struct sedf_edom_info));
        return 0;
 }
 
@@ -366,7 +366,7 @@
        inf->exec_domain = d;
        
        PRINT(2,"sedf_add_task was called, domain-id %i.%i\n",d->domain->id,
-             d->eid);
+             d->id);
              
        if (d->domain->id==0) {
                /*set dom0 to something useful to boot the machine*/
@@ -405,22 +405,22 @@
        
        for (i = 0; i < MAX_VIRT_CPUS; i++)
                if ( d->exec_domain[i] ) {
-                       ASSERT(d->exec_domain[i]->ed_sched_priv != NULL);
-                       xfree(d->exec_domain[i]->ed_sched_priv);
+                       ASSERT(d->exec_domain[i]->sched_priv != NULL);
+                       xfree(d->exec_domain[i]->sched_priv);
                }
 }
 
 /* Initialises idle task */
 static int sedf_init_idle_task(struct exec_domain *d) {
        PRINT(2,"sedf_init_idle_task was called, domain-id %i.%i\n",
-             d->domain->id, d->eid);
+             d->domain->id, d->id);
        if ( sedf_alloc_task(d) < 0 )
                return -1;
        
        sedf_add_task(d);
        EDOM_INFO(d)->deadl_abs = 0;
        EDOM_INFO(d)->status &= ~SEDF_ASLEEP;
-       set_bit(EDF_RUNNING, &d->ed_flags);
+       set_bit(EDF_RUNNING, &d->flags);
        /*the idle task doesn't have to turn up on any list...*/
        return 0;
 }
@@ -496,7 +496,7 @@
        list_for_each_safe(cur, tmp, waitq) {
                curinf = list_entry(cur, struct sedf_edom_info, list);
                PRINT(4,"\tLooking @ dom %i.%i\n",
-                     curinf->exec_domain->domain->id, 
curinf->exec_domain->eid);
+                     curinf->exec_domain->domain->id, curinf->exec_domain->id);
                if (PERIOD_BEGIN(curinf) <= now) {
                        __del_from_queue(curinf->exec_domain);
                        __add_to_runqueue_sort(curinf->exec_domain);
@@ -511,12 +511,12 @@
        list_for_each_safe(cur, tmp, runq) {
                curinf = list_entry(cur,struct sedf_edom_info,list);
                PRINT(4,"\tLooking @ dom %i.%i\n",
-                     curinf->exec_domain->domain->id, 
curinf->exec_domain->eid);
+                     curinf->exec_domain->domain->id, curinf->exec_domain->id);
                if (unlikely(curinf->slice == 0)) {
                        /*ignore domains with empty slice*/
                        PRINT(4,"\tUpdating zero-slice domain %i.%i\n",
                              curinf->exec_domain->domain->id,
-                             curinf->exec_domain->eid);
+                             curinf->exec_domain->id);
                        __del_from_queue(curinf->exec_domain);
                        
                        /*move them to their next period*/
@@ -534,7 +534,7 @@
                                "slice (%llu / %llu) now: %llu "\
                                "cputime: %llu\n",
                                curinf->exec_domain->domain->id,
-                               curinf->exec_domain->eid,
+                               curinf->exec_domain->id,
                                curinf->deadl_abs, curinf->slice, now,
                                curinf->cputime);
                        __del_from_queue(curinf->exec_domain);
@@ -600,11 +600,11 @@
                /*inf->short_block_lost_tot -= EXTRA_QUANTUM;*/
                inf->short_block_lost_tot -= now - inf->sched_start_abs;
                PRINT(3,"Domain %i.%i: Short_block_loss: %lli\n", 
-                     inf->exec_domain->domain->id, inf->exec_domain->eid,
+                     inf->exec_domain->domain->id, inf->exec_domain->id,
                      inf->short_block_lost_tot);
                if (inf->short_block_lost_tot <= 0) {
                        PRINT(4,"Domain %i.%i compensated short block loss!\n",
-                         inf->exec_domain->domain->id, inf->exec_domain->eid);
+                         inf->exec_domain->domain->id, inf->exec_domain->id);
                        /*we have (over-)compensated our block penalty*/
                        inf->short_block_lost_tot = 0;
                        /*we don't want a place on the penalty queue anymore!*/
@@ -807,14 +807,14 @@
 }
 
 static void sedf_sleep(struct exec_domain *d) {
-       PRINT(2,"sedf_sleep was called, domain-id %i.%i\n",d->domain->id, 
d->eid);
+       PRINT(2,"sedf_sleep was called, domain-id %i.%i\n",d->domain->id, 
d->id);
        
        if (is_idle_task(d->domain))
                return;
 
        EDOM_INFO(d)->status |= SEDF_ASLEEP;
        
-       if ( test_bit(EDF_RUNNING, &d->ed_flags) ) {
+       if ( test_bit(EDF_RUNNING, &d->flags) ) {
 #ifdef ADV_SCHED_HISTO
                adv_sched_hist_start(d->processor);
 #endif
@@ -1139,14 +1139,14 @@
        s_time_t              now = NOW();
        struct sedf_edom_info* inf = EDOM_INFO(d);
        
-       PRINT(3, "sedf_wake was called, domain-id %i.%i\n",d->domain->id, 
d->eid);
+       PRINT(3, "sedf_wake was called, domain-id %i.%i\n",d->domain->id, 
d->id);
        
        if (unlikely(is_idle_task(d->domain)))
                return;
                        
        if ( unlikely(__task_on_queue(d)) ) {
                PRINT(3,"\tdomain %i.%i is already in some queue\n",

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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