Re: kswapd's priority

Stephen C. Tweedie (sct@dcs.ed.ac.uk)
25 Jun 1998 23:38:18 +0100


Rik van Riel <H.H.vanRiel@phys.uu.nl> writes:

> > --- vmscan.c.orig Wed Jun 24 18:43:04 1998
> > +++ vmscan.c Wed Jun 24 18:43:19 1998
> > @@ -532,7 +532,7 @@
> > current->policy = SCHED_FIFO;
> > - current->priority = 32; /* Fixme --- we need to standardise our
> > + current->rt_priority = 32; /* Fixme --- we need to standardise our
> > namings for POSIX.4 realtime scheduling
> > priorities. */

> It might be better to change the value to 50. This way we
> can have 'soft' realtime tasks with a priority below
> kswapd's and 'hard' realtime tasks with a priority higher
> than kswapd's.

I think there's a better way to fix it, and it's already high up my 2.1
bugfix list. Before 2.2, I should be fixing kswapd to have a base
priority which is the lowest possible realtime priority, but to
temporarily inherit the priority of the highest priority task waiting
for memory. That will make sure that it has the correct realtime
priority at all times. ("Priority inheritance" is a standard and well
known solution to the "priority inversion" problem in realtime systems.)

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu