[lkml]   [1999]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: low priority soft RT?

On Mon, 26 Jul 1999 22:40:25 +0200 (CEST), Rik van Riel
<> 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

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


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:53    [W:0.105 / U:4.352 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site