Re: SCHED_IDLE patch is a source of DoS

Rik van Riel (H.H.vanRiel@phys.uu.nl)
Wed, 11 Nov 1998 11:02:54 +0100 (CET)


On Wed, 11 Nov 1998, MOLNAR Ingo wrote:
> On Tue, 10 Nov 1998, Rik van Riel wrote:
>
> > > This _is_ basically the 'classic' fix mentioned - the process
> > > holding the lock(s) attains the higher priority for the duration.
>
> the problem is that there is no easy central way to determine wether a
> process 'holds some valuable resource'.

If it is in kernel mode (we can determine this, can't we?)
we can take the assumption.

> > The goodness() piece will look approximately
> > like this:
> >
> > if (p->policy == SCHED_OTHER) {
> > if (p->lock_depth >= 0)

OK, we should change this to something like
if (p->in_kernel)
but how should we test for this and avoid 'false alarms'
for processes that simply ended in schedule?

> > return 1;
> > else
> > return -1;
> > }
>
> lock_depth is something very different ... It's not even a lock.

Yes, I already feared this :(

> if we want to do this, it's a major overhaul, definitely a 2.3 item.
> (just think read-write semaphores ... we do not have them currently,
> but it would be very hard and ineffective to make them
> priority-aware)

IMHO, this is a definite must-have for 2.3.

Maybe we can change the up()/down() and lock()/unlock()
macros/functions to also atomically increase and
decrease p->locks_held ???
Would that help or am I chasing ghosts here?

Rik -- slowly getting used to dvorak kbd layout...
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+

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