[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Getting and setting SEDF scheduling parameters

  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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 

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



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.