WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Scheduling of I/O domains

The patch you sent probably does work, but most of the code responsible for waking up got pushed into specific schedulers (i.e. it is not in schedule.c but in sched_bvt.c, sched_rrobin.c etc). I have replaced the "min <= now" bit by what BVT research paper suggests and only 0.7% difference was observed in the dd test. It would be nice if you could run the dd test on your machine after updating your xen code.

Also, yesterday I checked in a working version of the warping mechanism (anybody wants to test it, and report bugs to me?). If we run the IO-domains warped the difference in dd will probably be even smaller.


The proper fix should be a call into the scheduler if a task unblocks,
which shouldn't be too hard to add.


I found a simple way of doing this. In schedule.c/domain_wake(), I changed the following code slightly:
       if ( is_idle_task(curr) || (min_time <= now) )
           cpu_raise_softirq(cpu, SCHEDULE_SOFTIRQ);
This code causes the scheduler to be run if the current task is the idle task, or if the current task has already used up its time slice. I changed this to:
       if ( is_idle_task(curr) || (min_time <= now)
                || IS_CAPABLE_PHYSDEV(d) )
           cpu_raise_softirq(cpu, SCHEDULE_SOFTIRQ);

This causes the scheduler also to be run if the domain we are waking up is a device domain.

The stock BVT scheduling code seems to take care of the rest. Since the device domain tends to run relatively rarely, its virtual time is smaller, which causes the BVT algorithm to switch to it right away.

This changes the result of my little 'dd' test to be much closer to nominal:

time dd if=/dev/hda5 bs=1024k count=11 of=/dev/null

takes 1.96s with nothing else running.

takes 2.1s with a cpu intensive domain running concurrently

took over 8s without this change.

Maybe not perfect, but way better.


Rob Gardner
HP





-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel