> > Seems to me this particular case is covered by increasing
> > priority when grabbing the semaphore and normalizing
> > priority when releasing.
> >
> > Only root can do that - but only root does real-time
> > anyway. And I guess only rood should be able to increase
> > its timeslice too...
>
> Increasing its priority has no bearing on whether it runs out of
> timeslice, however. The idea here is to help the task complete its
> critical section (and thus not block other tasks) before being
> preempted. Only way to achieve that is boost its timeslice.
>
> Boosting its priority will assure there is no priority inversion and
> that, eventually, the task will run - but it does nothing to avoid the
> nasty "grab resource, be preempted, reschedule a bunch, finally find
> yourself running again since everyone else blocked" issue.
>
> And I don't think only root should be able to do this. If we later
> punish the task (take back the timeslice we gave it) then this is
> fair.
Another possibility might be to allow it to *steal* time from another
processes... Of course only processes of same UID ;-).
Pavel
-- (about SSSCA) "I don't say this lightly. However, I really think that the U.S. no longer is classifiable as a democracy, but rather as a plutocracy." --hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/