On Tue, 2004-06-15 at 13:29, Rus V. Brushkoff wrote: > Hi. > > After porting some stable worked on 2.4 apps to 2.6 I've noticed > spurious traps N14 in legacy rtf_put function. While investingating this > problem I've found an testcase - take an kernel latency example and simple > add somewere at latency-module.c big global variable : > > static char unused[1024 * 1024 * 8]; > > and run the example - you will receive something like : > .... > RTAI 3.1-test3 mounted over Adeos 2.6r5/x86. > RTAI[malloc] loaded (global heap size=131072 bytes). > > ***** STARTING THE UP REAL TIME SCHEDULER WITH LINUX ***** > ***** FP SUPPORT AND READY FOR A PERIODIC TIMER ***** > ***<> LINUX TICK AT 1000 (HZ) <>*** > ***<> CALIBRATED CPU FREQUENCY 2520162000 (HZ) <>*** > ***<> CALIBRATED TIMER-INTERRUPT-TO-SCHEDULER LATENCY 2688 (ns) <>*** > ***<> CALIBRATED ONE SHOT SETUP TIME 2010 (ns) <>*** > ***<> COMPILER: gcc version 3.3.3*** > > Default Trap Handler: vector 14: Suspend RT task ef8b8720 > ....... > > # lsmod > Module Size Used by > latency_rt 8395792 0 > rtai_fifos 45900 3 latency_rt > rtai_up 57272 2 latency_rt,rtai_fifos > rtai_hal 20724 3 latency_rt,rtai_fifos,rtai_up > ..... > > Tested with latest vesuvio cvs, UP, different kernel configs and two > different gcc - 3.3.3 and 3.4.0, hardware is ASUS P4 notebook L3H on SIS > 96x chipset. If someone interested can supply any additional info. >
Found the gremlin. As suspected, this was due to the on-demand VM mapping resolution. RT tasks were triggering page faults caught in the real-time domain that caused them to be killed by the HAL. As you noticed, extending the size of the data section makes the odds of encountering this situation higher since the module is loaded into vmalloc'ed memory by the kernel. Fixed in the vesuvio CVS. PS: this bug does not affect RTAI running over 2.4 kernels since Adeos for 2.4.x has a built-in fix for this. > > Rus -- Philippe.
