Re: low priority soft RT?

Stephen C. Tweedie (sct@redhat.com)
Tue, 27 Jul 1999 06:00:11 +0100 (BST)


Hi,

On Mon, 26 Jul 1999 22:40:25 +0200 (CEST), Rik van Riel
<riel@nl.linux.org> said:

> I completely agree on this one. We should probably mark a process
> with "bonus" if another process tries to grab a lock that's held
> by the first process.

"Priority inheritance." It adds complexity to _every_ place where the
kernel blocks. Remember, we don't always use locks. The page cache
has a single PG_Locked flag on the page, plus a per-page wait queue.
The buffer cache does similar things. Unless you put the extra bonus
code into the general-purpose wait queue macros, doing this sort of
thing is going to stomp on all sorts of bits of the kernel.

There's a much, much easier way --- just revoke the SCHED_IDLE
scheduling class when a process explicitly calls schedule(). That
automatically takes care of every single case where a process gives up
the CPU from inside the kernel. The only special case then becomes the
schedule inside return_to_user, where we want to keep SCHED_IDLE
intact.

However, that adds code to two of the hottest paths in the whole
kernel. Not nice.

--Stephen

-
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/