Mailing List Archive

Prevent BVT scheduler to be set with a too low ctx_allow by applying
# HG changeset patch
# User vhanquez@kneesa.uk.xensource.com
# Node ID 6b18f820f6a74f8c1b9600ccf408e8d9a1b9d026
# Parent f5b119533cc825726c9ecaa3bd2650b38033d4d8
Prevent BVT scheduler to be set with a too low ctx_allow by applying
a 10 microsecs low limit to the user parameter.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>

diff -r f5b119533cc8 -r 6b18f820f6a7 xen/common/sched_bvt.c
--- a/xen/common/sched_bvt.c Thu Dec 1 14:22:22 2005
+++ b/xen/common/sched_bvt.c Thu Dec 1 13:13:15 2005
@@ -67,6 +67,7 @@
#define MCU (s32)MICROSECS(100) /* Minimum unit */
#define MCU_ADVANCE 10 /* default weight */
#define TIME_SLOP (s32)MICROSECS(50) /* allow time to slip a bit */
+#define CTX_MIN (s32)MICROSECS(10) /* Low limit for ctx_allow */
static s32 ctx_allow = (s32)MILLISECS(5); /* context switch allowance */

static inline void __add_to_runqueue_head(struct vcpu *d)
@@ -297,7 +298,11 @@
if ( cmd->direction == SCHED_INFO_PUT )
ctx_allow = params->ctx_allow;
else
+ {
+ if ( ctx_allow < CTX_MIN )
+ ctx_allow = CTX_MIN;
params->ctx_allow = ctx_allow;
+ }

return 0;
}

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