RE: O(1) scheduler seems to lock up on sched_FIFO and sched_RR ta

Robert Love (rml@tech9.net)
18 Jun 2003 18:58:35 -0700


On Wed, 2003-06-18 at 18:44, Perez-Gonzalez, Inaky wrote:

> Now that we are at that, it might be wise to add a higher-than-anything
> priority that the kernel code can use (what would be 100 for user space,
> but off-limits), so even FIFO 99 code in user space cannot block out
> the migration thread, keventd and friends.

I did this about a year ago, and it is merged into the kernel.

See MAX_USER_RT_PRIO and MAX_RT_PRIO in <linux/sched.h>.

We just need to change MAX_RT_PRIO to, say, (MAX_USER_RT_PRIO + 10).

The one kicker is if we end up changing the size of BITMAP_SIZE, the
default sched_find_first_bit() will break and we will need to implement
a new one. I did a generic one, as well as code to detect at
compile-time which to use, but the optimized one is a lot nicer. On
32-bit machines, the BITMAP_SIZE ends up being 160-bits
(5*sizeof(unsigned long)) so there are about 20 extra priority levels
one can add "for free."

Robert Love

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