> The normal priority and the realtime priority are stored
> in different fields in the program structure.
> (p->priority vs p->rt_priority)
> Btw: does anybody know why this is done? It seems like
> a waste of space & cycles to me...
> (it could make goodness() faster & save memory)
I think there are two things for this differentiation: The first is that
you have a strict differentiation between the realtime tasks and the
'ordinary' tasks. The second is that p->rt_priority is used only for the
competition of the realtime tasks, while p->priority is used in two ways:
The scheduler (and the goodness function respectively) use (in some
cases) this value to decide which task will be executed next. The p->
priority is also used to (re)initialize the p->counter. If this counter is
zero, the task would be preempted (and reinitialized); so you get
more fairness between the tasks. If you increase the p->priority value for one
task, you will get a better performance for this task :-)
marc
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu