lkml.org 
[lkml]   [2009]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [RFC][PATCH] SCHED_EDF scheduling class
From
Hi Raistlin,

I have trouble compiling the (mainline) kernel for ARM u300_defconfig with the
sched-edf patches:

In file included from /home/linus/src/linux-trees/linux-2.6/kernel/sched.c:1856:
/home/linus/src/linux-trees/linux-2.6/kernel/sched_edf.c: In function
'pick_next_task_edf':
/home/linus/src/linux-trees/linux-2.6/kernel/sched_edf.c:435: error:
implicit declaration of function 'hrtick_enabled'

The hrtick_enabled() function is a static in sched.c, and should be visible
in sched_edf.c since it's #include:ed into sched.c so I'm pretty confused
about this one.

Could it be that I'm using a too bleeding edge compiler? This is a
arm-none-eabi-gcc (Sourcery G++ Lite 2008q3-66) 4.3.2
i.e. a CodeSourcery custom compiler, what are you using for ARM builds
in Pisa?

/home/linus/src/linux-trees/linux-2.6/kernel/sched.c: In function
'__setscheduler_ex':
/home/linus/src/linux-trees/linux-2.6/kernel/sched.c:6318: error:
'struct sched_edf_entity' has no member named 'bw'
/home/linus/src/linux-trees/linux-2.6/kernel/sched.c:6318: error:
implicit declaration of function 'to_ratio'

This is another thing: the code in struct sched_edf_entity only compiles
in the field bw if you have CONFIG_EDF_GROUP_SCHED, but the
code in sched.c __setscheduler_ex() use it no matter whether that's
configured or not.

This patch fixes it.

diff --git a/kernel/sched.c b/kernel/sched.c
index b41fc65..9ce89d4 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6315,8 +6315,10 @@ __setscheduler_ex(struct rq *rq, struct
task_struct *p, int policy,

edf_se->runtime_max = timespec_to_ns(&param_ex->sched_runtime);
edf_se->period = timespec_to_ns(&param_ex->sched_period);
+#ifdef CONFIG_EDF_GROUP_SCHED
edf_se->bw = to_ratio(timespec_to_ns(&param_ex->sched_period),
timespec_to_ns(&param_ex->sched_runtime));
+#endif

edf_se->runtime = edf_se->runtime_max;

Yours,
Linus Walleij

\
 
 \ /
  Last update: 2009-09-23 14:37    [W:0.387 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site