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] [PATCH] Getting and setting SEDF scheduling parameters

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Getting and setting SEDF scheduling parameters
From: John L Griffin <jlg@xxxxxxxxxx>
Date: Thu, 5 Jan 2006 14:26:14 -0500
Delivery-date: Thu, 05 Jan 2006 19:32:31 +0000
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This patch addresses three problems in the function sedf_adjdom():

1) Setting certain values during the DOM0_ADJUSTDOM hypercall causes an 
immediate system lockup.  Specifically, the lockup occurs during a 
SCHED_INFO_PUT operation if the user-specified value for period is 
nonzero, extratime is 1, and weight is zero.  (If you'd like my test code 
to verify this, mail me off-list.)  The attached patch tests for the 
invalid combination of (extratime == 1) && (weight == 0), and returns 
-EINVAL if encountered.

2) During the SCHED_SEDF / SCHED_INFO_GET hypercall, an incorrect value is 
returned for weight when (extratime == 1).  The attached patch fixes this 
problem.

3) The code logic in this function is cryptic, and there is not much 
documentation on how the scheduling parameters should be used.  The 
attached patch adds comments to the sedf_adjdom() function, and 
reorders/rewrites the logic of the SCHED_INFO_PUT handling to make the 
code more self-documenting.

Note that this patch makes strong assumptions about how the scheduling 
parameters are used.  So, I recommend someone take a really close look at 
my comments to make sure I've preserved the Xen team's intentions for how 
the SEDF scheduler works. :-)

Signed-off-by: jlg@xxxxxxxxxx

Attachment: 2006-01-05-jlg-sedf-scheduling.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>