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

Harald Kirsch (kir@iitb.fhg.de)
Sat, 31 Aug 1996 14:30:48 +0200


Hi there,

together with Ingo Molnar <mingo@pc5829.hil.siemens.at> I am trying to
track down the reason why a process with scheduling policy SCHED_FIFO
and state TASK_RUNNING does not get its turn for sometimes more than 5
jiffies. There are no other realtime processes on the system, and the
scheduler *MUST* select this task. Conclusion: the scheduler is not
called for more than 5 jiffies.

However, timer_interrupt() is called every 10ms as it should, and a
printout of EIP most often points into generic_file_read(), line 663.

Another observation is, that the long sleep of the realtime process
usually happens at the moment I start up a new process (tcsh in an
rxvt).

CONCLUSION:
>From all this I draw the conclusion (and I don't know much about the
Linux kernel) that the following is the cause of the above symptoms:

1) On process-startup libc.so.* is mmap()ed into the process address
space.
2) This is quite a lot of work, but since most of libc.so.* is cached
somewhere, there is no need to wait on a device. Therefore
sleep_on() or schedule() is never called.
3) On my slow machine (i486/33MHz, 16M), mapping of libc can take
60ms.

QUESTIONS:
Can anybody tell me, if the above conclusion is correct?
If it is, is there a chance that this is declared a `bug' and is changed
in a future release?

Thanks for your time,
Harald Kirsch

-------------------------------------------------+------------------
Harald Kirsch, kir@iitb.fhg.de, +49 721 6091 384 | This message is
FhG/IITB, Fraunhoferstr.1, 76131 Karlsruhe | subject oriented.