[etherlab-users] Memory for kernel module

Westpfahl Jasper Jasper.Westpfahl-projekt at ipk.fraunhofer.de
Wed Jan 19 17:16:43 CET 2011


Hello Wilhelm,

no, I don't use any large matrices as parameters. However SimMechanics will probably need to generate large matrices to calculate.

some other things I've tried with the model is to put <hide> behind all SimMechanics blocks and set the process image decimation rate to 1000 with fundamental sample time at 1/1000 using 120000 for stack size, which is about the maximum I can get without getting the error mentioned in the previous mail.

Also I used top to monitor CPU usage which sometimes showed 100% usage (for one core) and sometimes was below 10% for the exact same module just at a different time. In both cases however the Ethercat connector blocks don't switch to OP and the testmanager says ExecTime value=0, Period value=0.

the ouput from /var/log/messages contains an unusual line directly after 'Successfully registered...':

Jan 19 15:59:14 MPT43 kernel: Application tid 0 running at 1000000ns
Jan 19 15:59:14 MPT43 kernel: Successfully registered application "Test2" with RT-AppCore.
Jan 19 15:59:14 MPT43 kernel: Default Trap Handler: vector 6: Suspend RT task f40ca980

it is also the last line after the insmod command. I googled that without success.

Gross simplifications to the model make it work but also completely unpractical.

best regards,
Jasper


-----Urspr√ľngliche Nachricht-----
Von: Dr.-Ing. Wilhelm Hagemeister [mailto:hm at igh-essen.com]
Gesendet: Fr 14.01.2011 09:18
An: Westpfahl Jasper; etherlab-users at etherlab.org
Betreff: Re: [etherlab-users] Memory for kernel module
 
Hello Jasper,

please tell a bit more about your model. Do you use large matrices as
parameter (This is usually the problem)?

Regards Wilhelm.


Am 13.01.2011 14:08, schrieb Westpfahl Jasper:
> 
> Dear Etherlab-friends,
> 
> I've got a problem with memory allocation and I hope, somebody can help me...
> 
> Building a kernel modul with rtai stack size (in simulink configuration parameters / Etherlab C code generation options) works with values of 20000 and 200000. 
> When inserting the module with 20000, it works fine, meaning that I get a connection to the realtime-process, but the stack size is not big enough to operate the model properly.
> When inserting the module with 200000 (insmod tb_kmod.ko), I got the messsage
> 
> insmod: error inserting 'tb_kmod.ko': -1 Cannot allocate memory
> 
> Can anybody tell me, where and how to adjust the accepted Rtai stack size?
> 
> /var/log/messages is attached.
> 
> Thank You very much in advance!
> 
> Jasper
> _______________________________________________
> etherlab-users mailing list
> etherlab-users at etherlab.org
> http://lists.etherlab.org/mailman/listinfo/etherlab-users





More information about the Etherlab-users mailing list