Re: How many jiffies is mmap() allowed to take in a row?

Linus Torvalds (
Sun, 1 Sep 1996 09:24:07 +0300 (EET DST)

On 31 Aug 1996, Mike Robinson wrote:
> If you browse through sched.c, I think you'll find that reschedule is not called
> if the currently running task has ticks left on its time slice. sched.c can be
> patched to set need_resched true if any real time priority task is made runnable
> at the current tick, but this is not done by default. Sorry I can't provide a
> patch, but it's Sunday and I'm not at work. (I think there are other problems
> too, BTW)

Actually, schedule() _is_ called even if the currently running process
has ticks left, but only if the "need_resched" flag is set.

And the problem might be that "add_to_runqueue()" doesn't actually know
about real-time processes, so it doesn't set need_resched when waking up
a real-time task..