All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Accurate vcpu weighting for credit scheduler
@ 2008-12-08  6:34 Atsushi SAKAI
  2008-12-08 11:01 ` George Dunlap
  0 siblings, 1 reply; 11+ messages in thread
From: Atsushi SAKAI @ 2008-12-08  6:34 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 1112 bytes --]

Hi,

This patch intends to accurate vcpu weighting
for CPU intensive job.

The reason of this problem is that
vcpu round-robin queue blocks large weight vcpus
by small weight vcpus.

For example, we assume following case on 2pcpu environment.
(with 4domains (each domain has 2vcpus))

dom1 vcpu0,1 w128 credit  4
dom2 vcpu0,1 w128 credit  4
dom3 vcpu0,1 w256 credit  8
dom4 vcpu0,1 w512 credit 15


d4v0 gets 15ms credit each time.
but if 3vcpus are blocking,(like d1v0, d2v0, d3v0)
d4v0 credit becomes over 30msec(45msec=15x3times).
Then d4v0 credit cleared.
This makes d4v0 uses smaller credit than expected.
This problem also occurs on d4v1 case.
(blocked by d1v1, d2v1, d3v1)


In my case, xentop shows following % for each domain.
dom1 27
dom2 28
dom3 53
dom4 88

After this patch applied, each domain has following %.
dom1 25
dom2 25
dom3 49
dom4 99

This patch adds condition that 
"credit clear function" should work
when vcpu is not runnable.

 sched_credit.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>


Thanks
Atsushi SAKAI

 

[-- Attachment #2: xen-upper-bound-check-when-not-in-runqueue.patch --]
[-- Type: application/octet-stream, Size: 784 bytes --]

diff -r 1b173394f815 xen/common/sched_credit.c
--- a/xen/common/sched_credit.c	Thu Dec 04 16:36:43 2008 +0000
+++ b/xen/common/sched_credit.c	Fri Dec 05 23:28:00 2008 +0900
@@ -991,8 +991,11 @@ csched_acct(void)
                     svc->flags &= ~CSCHED_FLAG_VCPU_PARKED;
                 }
 
-                /* Upper bound on credits means VCPU stops earning */
-                if ( credit > CSCHED_CREDITS_PER_TSLICE )
+                /* Upper bound on credits means VCPU stops earning,
+                 * when VCPU is not in runqueue.
+                 */
+                if ( credit > CSCHED_CREDITS_PER_TSLICE &&
+                     !vcpu_runnable(svc->vcpu) )
                 {
                     __csched_vcpu_acct_stop_locked(svc);
                     credit = 0;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

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

end of thread, other threads:[~2008-12-18  4:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <B1B89F2B-4EDC-48E5-B07A-8793162DA35C@gmail.com>
2008-12-10  2:45 ` [PATCH] Accurate vcpu weighting for credit scheduler Atsushi SAKAI
2008-12-11 10:34   ` George Dunlap
2008-12-11 11:33     ` Atsushi SAKAI
2008-12-15  6:53     ` Atsushi SAKAI
2008-12-18  3:20       ` NISHIGUCHI Naoki
2008-12-18  3:31         ` Atsushi SAKAI
2008-12-18  4:23           ` NISHIGUCHI Naoki
2008-12-08  6:34 Atsushi SAKAI
2008-12-08 11:01 ` George Dunlap
2008-12-09  7:33   ` Atsushi SAKAI
2008-12-09 10:25     ` 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.