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

To: rolf.neugebauer@xxxxxxxxx
Subject: Re: [Xen-devel] Scheduling of I/O domains
From: Rob Gardner <rob.gardner@xxxxxx>
Date: Thu, 05 Aug 2004 16:21:42 -0600
Cc: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, "G. Milos" <gm281@xxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 05 Aug 2004 23:31:09 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: <1091194332.10916.55.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
References: <E1BnRpv-000708-00@xxxxxxxxxxxxxxxxx> <1091194332.10916.55.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
Rolf Neugebauer wrote:

...
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