Re: [patch 04/10] PI-futex: scheduler support for PI

From: Ingo Molnar
Date: Sun Mar 26 2006 - 11:24:05 EST



* Andrew Morton <akpm@xxxxxxxx> wrote:

> > +#ifdef CONFIG_RT_MUTEXES
> > +
> > +/*
> > + * rt_mutex_setprio - set the current priority of a task
> > + * @p: task
> > + * @prio: prio value (kernel-internal form)
> > + *
> > + * This function changes the 'effective' priority of a task. It does
> > + * not touch ->normal_prio like __setscheduler().
> > + *
> > + * Used by the rt_mutex code to implement priority inheritance logic.
> > + */
> > +void rt_mutex_setprio(task_t *p, int prio)
> > +{
>
> This function is not really rt-mutex-related at all, is it? It's just
> a piece of new scheduler functionality which various things might use.

well, this particular function should only be used by the rt-mutex
subsystem, because it sets the priority of a task unconditionally.
Priority will vary depending on how other tasks block on a lock held by
this task. So if some other subsystem changes the priority via this
interface, it will both interfere with PI, and PI will interfere with
this.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/