From 11c1c99d7fd4004244d18f4df144f0420956b9db Mon Sep 17 00:00:00 2001 From: Andrea Bastoni Date: Wed, 22 Sep 2010 14:47:44 -0400 Subject: Enforce minimum budget in every slice. --- bin/common.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/common.c b/bin/common.c index b43ebf3..167344a 100644 --- a/bin/common.c +++ b/bin/common.c @@ -1,6 +1,7 @@ #include #include #include +#include #include "common.h" @@ -21,7 +22,7 @@ void bail_out(const char* msg) * and we scan a list of slice parameters up to slices_number: * * Format for slices: - * + * * . * * The offset is the start time for the slice relative to the job release. @@ -68,6 +69,12 @@ int parse_edfwm_slice(FILE *ts, int slices_no, int task_id, wm->slices[i].budget, wm->slices[i].offset); total_budget += wm->slices[i].budget; + if (wm->slices[i].budget < MIN_EDF_WM_SLICE_SIZE) { + + fprintf(stderr, "Slice %llu is too small\n", + wm->slices[i].budget); + return -1; + } } if (ferror(ts)) { -- cgit v1.2.2