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

[Xen-devel] [RFC][PATCH] Scheduler interface changes for credit2

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [RFC][PATCH] Scheduler interface changes for credit2
From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Date: Mon, 15 Feb 2010 17:20:08 +0000
Delivery-date: Mon, 15 Feb 2010 09:21:18 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=1PF2+8nWo6hVExgf4XBeAKuDMzsE9FpIgOCi5k8tvIc=; b=FnWH4/OvTD5++wZbNzfEOa1Ygm4bVbNab1J6yjDKEmeMejCQOdJbk/RZT5Sv6/Q23b Kc4Kjr8MFvtAw9dB69D0jhpsiXpY6D59Clu4yQpt3hfIksJXTB7Kt7fHHg2Ip0xrCBpS gkQCCLtvOKhL59Gy46vj8eTy0I6UXfMYHPWXE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=WDHGfb/JGyLHJasWp2V2J7338bNOM0o7t6UPqHH0qDVGev21NWoIV2eBjAAQ+5G5we +gjWejezRKsUW9ztmFow3MWOWdEt+C0N4KRffbonPBW+G4fNbjVTFGSJdzBOY1U6LQc4 fsAgnmXP+JRKYC2MuBLaJrAiVqCeIvCh6/EW0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
The two attached patches change the scheduler interface to allow
credit2 to have several cpus share the same runqueue.  The patches
should have almost no impact on the current schedulers.  The patches
and their reasonings are below.  I've also attached the patches for
the prototype credit2 scheduler, for reference.

* Add a context swich callback (sched-context_switch-callback.diff)

Add a callback to tell a scheduler that a vcpu has been completely
context-switched off a cpu.

When sharing a runqueue, we can't put a scheduled-out vcpu back on the
runqueue until it's been completely de-scheduled, because it may be
grabbed by another processor before it's ready.  This callback allows
a scheduler to detect when a vcpu on its way out is completely off the
processor, so that it can put the vcpu on the runqueue.

* Allow sharing of locks between cpus (sched-spin_lock-pointers.diff)

Have per-cpu pointers, initialized to per-cpu locks, which the
scheduler may change during its init to reconfigure locking
granularity.

There are a number of race conditions having to do with updating of
v->is_running and v->processor, all having to do with the fact that
vcpus may change cpus without an explicit migrate.  Furthermore, the
scheduler needs runqueues to be covered by a lock as well.  The
cleanest way to solve all of these is to have the scheduler lock and
the runqueue lock coincide.

* Add a "scheduler" trace class (trace-sched-class.diff)
Uses defined on a per-scheduler basis

I've been running parallel kernel compiles on a 16-way box (2x4x2) for
several hours now without deadlocks or BUG()s.  As far as I'm
concerned, with these changes, credit2 is now ready to be checked in,
as long as it's not set to the default scheduler.

All of the above:
Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

Attachment: sched-context_switch-callback.diff
Description: Text Data

Attachment: sched-spin_lock-pointers.diff
Description: Text Data

Attachment: trace-sched-class.diff
Description: Text Data

Attachment: 20100215-credit2-hypervisor-spinlock-pointers.diff
Description: Text Data

Attachment: 20100215-credit2-tools.diff
Description: Text Data

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