All of lore.kernel.org
 help / color / mirror / Atom feed
* [Q] about Credit Scheduler Dom0 Scheduling policy.
@ 2006-10-18 11:49 Atsushi SAKAI
  2006-10-18 13:11 ` Emmanuel Ackaouy
  0 siblings, 1 reply; 16+ messages in thread
From: Atsushi SAKAI @ 2006-10-18 11:49 UTC (permalink / raw)
  To: xen-devel

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

Hi, Emmanuel,

 Thank you for your previous comment.
I still waiting for second item comments.

Anyway, I want to ask you a opinion 
about the credit scheduler's vcpu scheduling policy.
(compare with the "sedf" scheduler)
The reason of this asking is
this matter should be related to I/O performance in Multi-VM.

My testing was done by following 3 DomUs. 
DomU1, DomU2(CPU intensive jobs are running)
DomU3(I/O intensive jobs are running)

By seeing xentrace, scheduling behavior seems differentiated by schedulers
especially Dom0(Driver Domain) vcpu scheduling policy
(I checked vcpu_wake and dispatched time difference.)

In SEDF-scheduler,
When Dom0 vcpu wakes, Dom0 vcpu gets pcpu resources immediately.
(in worst case the delay is within 1msec)
But in CREDIT-scheduler,
Sometime Dom0 vcpu have large latency.(sometimes 60msec)

I think this delayed reason is the behavior of credit scheduler.
In the credit scheduler,
When Dom0 vcpu wakes, Dom0 vcpu just adds in runq tail.
(this makes a problem.)

I think Dom0 vcpu wake up should be handled prioritize the UNDER runq.
Since it reflects response time especially I/O.


Of course,
CPU intensive job(in following document VCPU SPIN) domain is just one,
It has no problem, since runq has no vcpu.
http://www.xensource.com/files/summit_3/sched.pdf#page=4
In this case, if requesting context switch(SCHEDULE_SOFTIRQ) is occured,
it switches to VCPU I/O successfully.
But my example case(2 SPIN VCPU), a VCPU SPIN is in runq
(since 2 SPIN VCPU domain are exists).
In this case SCHEDULE_SOFTIRQ, just pushes another VCPU SPIN,
So VCPU I/O is not started.

Waiting for your opinion.

Thanks
Atsushi SAKAI

=============================================================
My Test Configuration is

#pcpu=1
#vcpu=1(Dom0, DomU1, DomU2, DomU3)

CPU intensive domain: DomU1 and DomU2
I/O intensive domain: DomU3
Privileged Domain   : Dom0 

CPU intensive domain runs cpu-loop
like follows,
main(){int a;while(1){a++;};}

I/O intensive domain runs fsdisk
(which is included in unixbench 4.1.0)

Privileged Domain runs
xenmon.py or 
xentrace in standard configuration(uses tools/xentrace/formats)
The xentrace output is included in this mail.
(I picked up the problem from xentrace outputs.)
=============================================================


[-- Attachment #2: xentrace-credit-sedf.log --]
[-- Type: application/octet-stream, Size: 2679 bytes --]

==============================================================

Trace for CREDIT(TSC=1600MHz)

CPU0	3988994921928		domain_wake		[ domid = 0x00000000, edomid = 0x00000000 ]
CPU0	3988994926067		__enter_scheduler	[ prev<domid:edomid> = 0x00000001 : 0x00000000, next<domid:edomid> = 0x00000002 : 0x00000000 ]
CPU0	3989042796441		__enter_scheduler	[ prev<domid:edomid> = 0x00000002 : 0x00000000, next<domid:edomid> = 0x00000003 : 0x00000000 ]
CPU0	3989090667515		__enter_scheduler	[ prev<domid:edomid> = 0x00000003 : 0x00000000, next<domid:edomid> = 0x00000000 : 0x00000000 ]
CPU0	3989090713813		do_block		[ domid = 0x00000000, edomid = 0x00000000 ]
CPU0	3989090715414		__enter_scheduler	[ prev<domid:edomid> = 0x00000000 : 0x00000000, next<domid:edomid> = 0x00000001 : 0x00000000 ]
CPU0	3989106616416		domain_wake		[ domid = 0x00000000, edomid = 0x00000000 ]
CPU0	3989138590577		__enter_scheduler	[ prev<domid:edomid> = 0x00000001 : 0x00000000, next<domid:edomid> = 0x00000000 : 0x00000000 ]
CPU0	3989139096208		do_block		[ domid = 0x00000000, edomid = 0x00000000 ]
CPU0	3989139098707		__enter_scheduler	[ prev<domid:edomid> = 0x00000000 : 0x00000000, next<domid:edomid> = 0x00000002 : 0x00000000 ]
CPU0	3989142052990		domain_wake		[ domid = 0x00000000, edomid = 0x00000000 ]
CPU0	3989186970240		__enter_scheduler	[ prev<domid:edomid> = 0x00000002 : 0x00000000, next<domid:edomid> = 0x00000003 : 0x00000000 ]
CPU0	3989234841542		__enter_scheduler	[ prev<domid:edomid> = 0x00000003 : 0x00000000, next<domid:edomid> = 0x00000000 : 0x00000000 ]

1600 counts are 1usec
typical scheduling is 30msec (=50,000,000)
so Worst case 60msec delayed.(all vcpus are UNDER CREDIT)
Blocked by CPU intensive Domain.

Trace for SEDF(TSC=1600MHz)

CPU0	1669708199058		domain_wake		[ domid = 0x00000000, edomid = 0x00000000 ]
CPU0	1669708201713		__enter_scheduler	[ prev<domid:edomid> = 0x00000004 : 0x00000000, next<domid:edomid> = 0x00000000 : 0x00000000 ]
CPU0	1669708505350		do_block		[ domid = 0x00000000, edomid = 0x00000000 ]
CPU0	1669708507796		__enter_scheduler	[ prev<domid:edomid> = 0x00000000 : 0x00000000, next<domid:edomid> = 0x00000005 : 0x00000000 ]
CPU0	1669708706495		domain_wake		[ domid = 0x00000000, edomid = 0x00000000 ]
CPU0	1669709307378		__enter_scheduler	[ prev<domid:edomid> = 0x00000005 : 0x00000000, next<domid:edomid> = 0x00000006 : 0x00000000 ]
CPU0	1669710107088		__enter_scheduler	[ prev<domid:edomid> = 0x00000006 : 0x00000000, next<domid:edomid> = 0x00000004 : 0x00000000 ]

typicall just run after wake up dom0 vcpu runs 
in this case 0.5msec (800,000) after dom0 vcpu wakes up


================================================================


[-- 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] 16+ messages in thread

end of thread, other threads:[~2006-10-26 13:47 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-18 11:49 [Q] about Credit Scheduler Dom0 Scheduling policy Atsushi SAKAI
2006-10-18 13:11 ` Emmanuel Ackaouy
2006-10-18 13:24   ` Emmanuel Ackaouy
2006-10-23  4:13     ` Atsushi SAKAI
2006-10-23 14:32       ` Emmanuel Ackaouy
2006-10-24  6:46         ` Atsushi SAKAI
2006-10-24  9:49           ` Emmanuel Ackaouy
2006-10-25 10:29           ` Emmanuel Ackaouy
2006-10-25 13:02             ` Atsushi SAKAI
2006-10-25 14:03               ` Emmanuel Ackaouy
2006-10-26  6:15                 ` Atsushi SAKAI
2006-10-26  8:35                   ` Atsushi SAKAI
2006-10-26  8:42                     ` Emmanuel Ackaouy
2006-10-26 12:52                       ` Pasi Kärkkäinen
2006-10-26 13:04                         ` Emmanuel Ackaouy
2006-10-26 13:47                           ` Pasi Kärkkäinen

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.