All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0 of 3] credit2: Miscelaneous updates
@ 2010-12-09 17:53 George Dunlap
  2010-12-09 17:53 ` [PATCH 1 of 3] credit2: Putting a vcpu to sleep also removes the delayed_runq_add flag George Dunlap
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: George Dunlap @ 2010-12-09 17:53 UTC (permalink / raw)
  To: xen-devel; +Cc: george.dunlap

Miscellaneous fixes / tweaks to credit2 code.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1 of 3] credit2: Putting a vcpu to sleep also removes the delayed_runq_add flag
  2010-12-09 17:53 [PATCH 0 of 3] credit2: Miscelaneous updates George Dunlap
@ 2010-12-09 17:53 ` George Dunlap
  2010-12-09 17:53 ` [PATCH 2 of 3] credit2: Use vcpu processor explicitly George Dunlap
  2010-12-09 17:53 ` [PATCH 3 of 3] credit2: Trace rdtsc value with some more records George Dunlap
  2 siblings, 0 replies; 4+ messages in thread
From: George Dunlap @ 2010-12-09 17:53 UTC (permalink / raw)
  To: xen-devel; +Cc: george.dunlap

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>

diff -r 49d2aa5cee4e -r 9c5960826cd6 xen/common/sched_credit2.c
--- a/xen/common/sched_credit2.c	Thu Dec 09 16:17:33 2010 +0000
+++ b/xen/common/sched_credit2.c	Thu Dec 09 17:50:54 2010 +0000
@@ -668,6 +668,8 @@
         cpu_raise_softirq(vc->processor, SCHEDULE_SOFTIRQ);
     else if ( __vcpu_on_runq(svc) )
         __runq_remove(svc);
+    else if ( test_bit(__CSFLAG_delayed_runq_add, &svc->flags) )
+        clear_bit(__CSFLAG_delayed_runq_add, &svc->flags);
 }
 
 static void

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2 of 3] credit2: Use vcpu processor explicitly
  2010-12-09 17:53 [PATCH 0 of 3] credit2: Miscelaneous updates George Dunlap
  2010-12-09 17:53 ` [PATCH 1 of 3] credit2: Putting a vcpu to sleep also removes the delayed_runq_add flag George Dunlap
@ 2010-12-09 17:53 ` George Dunlap
  2010-12-09 17:53 ` [PATCH 3 of 3] credit2: Trace rdtsc value with some more records George Dunlap
  2 siblings, 0 replies; 4+ messages in thread
From: George Dunlap @ 2010-12-09 17:53 UTC (permalink / raw)
  To: xen-devel; +Cc: george.dunlap

No functional changes.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>

diff -r 9c5960826cd6 -r 61d80662cc5f xen/common/sched_credit2.c
--- a/xen/common/sched_credit2.c	Thu Dec 09 17:50:54 2010 +0000
+++ b/xen/common/sched_credit2.c	Thu Dec 09 17:50:54 2010 +0000
@@ -676,7 +676,6 @@
 csched_vcpu_wake(const struct scheduler *ops, struct vcpu *vc)
 {
     struct csched_vcpu * const svc = CSCHED_VCPU(vc);
-    const unsigned int cpu = vc->processor;
     s_time_t now = 0;
 
     /* Schedule lock should be held at this point. */
@@ -686,7 +685,7 @@
     BUG_ON( is_idle_vcpu(vc) );
 
     /* Make sure svc priority mod happens before runq check */
-    if ( unlikely(per_cpu(schedule_data, cpu).curr == vc) )
+    if ( unlikely(per_cpu(schedule_data, vc->processor).curr == vc) )
     {
         goto out;
     }
@@ -710,8 +709,8 @@
     now = NOW();
 
     /* Put the VCPU on the runq */
-    runq_insert(ops, cpu, svc);
-    runq_tickle(ops, cpu, svc, now);
+    runq_insert(ops, vc->processor, svc);
+    runq_tickle(ops, vc->processor, svc, now);
 
 out:
     d2printk("w-\n");
@@ -722,6 +721,7 @@
 csched_context_saved(const struct scheduler *ops, struct vcpu *vc)
 {
     struct csched_vcpu * const svc = CSCHED_VCPU(vc);
+    s_time_t now = NOW();
 
     vcpu_schedule_lock_irq(vc);
 
@@ -738,14 +738,11 @@
      */
     if ( test_bit(__CSFLAG_delayed_runq_add, &svc->flags) )
     {
-        const unsigned int cpu = vc->processor;
-
+        BUG_ON(__vcpu_on_runq(svc));
         clear_bit(__CSFLAG_delayed_runq_add, &svc->flags);
 
-        BUG_ON(__vcpu_on_runq(svc));
-
-        runq_insert(ops, cpu, svc);
-        runq_tickle(ops, cpu, svc, NOW());
+        runq_insert(ops, vc->processor, svc);
+        runq_tickle(ops, vc->processor, svc, now);
     }
 
     vcpu_schedule_unlock_irq(vc);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 3 of 3] credit2: Trace rdtsc value with some more records
  2010-12-09 17:53 [PATCH 0 of 3] credit2: Miscelaneous updates George Dunlap
  2010-12-09 17:53 ` [PATCH 1 of 3] credit2: Putting a vcpu to sleep also removes the delayed_runq_add flag George Dunlap
  2010-12-09 17:53 ` [PATCH 2 of 3] credit2: Use vcpu processor explicitly George Dunlap
@ 2010-12-09 17:53 ` George Dunlap
  2 siblings, 0 replies; 4+ messages in thread
From: George Dunlap @ 2010-12-09 17:53 UTC (permalink / raw)
  To: xen-devel; +Cc: george.dunlap

Makes the traces slightly larger, but easier to analyze.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>

diff -r 61d80662cc5f -r 93bf801bd87a xen/common/sched_credit2.c
--- a/xen/common/sched_credit2.c	Thu Dec 09 17:50:54 2010 +0000
+++ b/xen/common/sched_credit2.c	Thu Dec 09 17:50:54 2010 +0000
@@ -383,7 +383,7 @@
             d.dom = cur->vcpu->domain->domain_id;
             d.vcpu = cur->vcpu->vcpu_id;
             d.credit = cur->credit;
-            trace_var(TRC_CSCHED2_TICKLE_CHECK, 0,
+            trace_var(TRC_CSCHED2_TICKLE_CHECK, 1,
                       sizeof(d),
                       (unsigned char *)&d);
         }
@@ -445,7 +445,7 @@
             d.vcpu = svc->vcpu->vcpu_id;
             d.credit_start = start_credit;
             d.credit_end = svc->credit;
-            trace_var(TRC_CSCHED2_CREDIT_RESET, 0,
+            trace_var(TRC_CSCHED2_CREDIT_RESET, 1,
                       sizeof(d),
                       (unsigned char *)&d);
         }
@@ -494,7 +494,7 @@
         d.vcpu = svc->vcpu->vcpu_id;
         d.credit = svc->credit;
         d.delta = delta;
-        trace_var(TRC_CSCHED2_CREDIT_BURN, 0,
+        trace_var(TRC_CSCHED2_CREDIT_BURN, 1,
                   sizeof(d),
                   (unsigned char *)&d);
     }

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-09 17:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-09 17:53 [PATCH 0 of 3] credit2: Miscelaneous updates George Dunlap
2010-12-09 17:53 ` [PATCH 1 of 3] credit2: Putting a vcpu to sleep also removes the delayed_runq_add flag George Dunlap
2010-12-09 17:53 ` [PATCH 2 of 3] credit2: Use vcpu processor explicitly George Dunlap
2010-12-09 17:53 ` [PATCH 3 of 3] credit2: Trace rdtsc value with some more records George Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.