aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2007-10-09 00:01:06 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2007-10-09 00:01:06 -0400
commit159a72bf72c406606a32a245a00af5cba327f975 (patch)
tree6bdc95940598ea6bc0518ea72ab4c5e9b920e2af /kernel
parent614576d9a1b94b1ff0a45e5a06eb289dca5813de (diff)
adaptive: get rid of weight-estimator slope misconception
This concept is redundant with the per-service-level weights. Also fix the get_sl() macro.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/litmus.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/kernel/litmus.c b/kernel/litmus.c
index e837850998..81132dc848 100644
--- a/kernel/litmus.c
+++ b/kernel/litmus.c
@@ -181,8 +181,7 @@ asmlinkage long sys_get_rt_task_param(pid_t pid, rt_param_t __user * param)
181 */ 181 */
182asmlinkage long sys_set_service_levels(pid_t pid, 182asmlinkage long sys_set_service_levels(pid_t pid,
183 unsigned int count, 183 unsigned int count,
184 service_level_t __user *levels, 184 service_level_t __user *levels)
185 fp_t __user *wt_y, fp_t __user *wt_slope)
186{ 185{
187 struct task_struct *target; 186 struct task_struct *target;
188 service_level_t level, *klevels; 187 service_level_t level, *klevels;
@@ -218,35 +217,6 @@ asmlinkage long sys_set_service_levels(pid_t pid,
218 target->rt_param.service_level = NULL; 217 target->rt_param.service_level = NULL;
219 target->rt_param.no_service_levels = 0; 218 target->rt_param.no_service_levels = 0;
220 219
221 if (wt_y && wt_slope) {
222 if (copy_from_user(&target->rt_param.wt_y, wt_y,
223 sizeof(fp_t))) {
224 retval = -EFAULT;
225 target->rt_param.wt_y = FP(0);
226 goto out;
227 }
228 if (copy_from_user(&target->rt_param.wt_slope, wt_slope,
229 sizeof(fp_t))) {
230 retval = -EFAULT;
231 target->rt_param.wt_y = FP(0);
232 target->rt_param.wt_slope = FP(1);
233 goto out;
234 }
235 if (_lt(target->rt_param.wt_y, FP(0)) ||
236 _leq(target->rt_param.wt_slope, FP(0))) {
237 retval = -EINVAL;
238 target->rt_param.wt_y = FP(0);
239 target->rt_param.wt_slope = FP(1);
240 goto out;
241 }
242 } else {
243 target->rt_param.wt_y = FP(0);
244 target->rt_param.wt_slope = FP(1);
245 }
246
247 TRACE_TASK(target, "set slope=" _FP_ ", y=" _FP_ "\n",
248 target->rt_param.wt_slope, target->rt_param.wt_y);
249
250 /* count == 0 means tear down service levels*/ 220 /* count == 0 means tear down service levels*/
251 if (count == 0) { 221 if (count == 0) {
252 retval = 0; 222 retval = 0;