Scheduling, sigaction - program no longer works after change of kernel
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Scheduling, sigaction - program no longer works after change of kernel
Hi,
I use to run Mandrake 10.2 kernel 2.6.11-6.
I now run Mandriva 2007.1 kernel 2.6.17-14.
I am new to scheduling, i have taken over looking after a test program that every 1 second will output up to 1000 udp data messages (each packet 46 bytes). The program was written using scheduling and using a nanosleep to try to balance the load of the data across 1 second as best it could by (to avoid it overwritting data in the buffer as all 1000 data message were being output in 0.01 of a second.)
Without the nanosleep in the code in the loop that outputs the data the 1000 data messages all come out in 0.03, which is fine, but tcpdump can only record approximately 630, so the rest are being overwritten.
In Mandrake 10.2 the scheduling all worked fine, the data would be spread across 1 second. A change to Mandriva 2007.1 with a new kernel has resulted in the data spreading across 4-5 seconds now and that is not exceptable, it must be 1 second or less.
The source code has not changed at all, the only change is kernel and o/s.
Any ideas would be greatly appreciated.
In the code where it states "do stuff" i have removed a part of the code as it is not important to this problem, the .h file is also in this boat.
I use to run Mandrake 10.2 kernel 2.6.11-6.
I now run Mandriva 2007.1 kernel 2.6.17-14.
I am new to scheduling, i have taken over looking after a test program that every 1 second will output up to 1000 udp data messages (each packet 46 bytes). The program was written using scheduling and using a nanosleep to try to balance the load of the data across 1 second as best it could by (to avoid it overwritting data in the buffer as all 1000 data message were being output in 0.01 of a second.)
Without the nanosleep in the code in the loop that outputs the data the 1000 data messages all come out in 0.03, which is fine, but tcpdump can only record approximately 630, so the rest are being overwritten.
In Mandrake 10.2 the scheduling all worked fine, the data would be spread across 1 second. A change to Mandriva 2007.1 with a new kernel has resulted in the data spreading across 4-5 seconds now and that is not exceptable, it must be 1 second or less.
The source code has not changed at all, the only change is kernel and o/s.
Any ideas would be greatly appreciated.
In the code where it states "do stuff" i have removed a part of the code as it is not important to this problem, the .h file is also in this boat.
I would to suggest u to look at options required to enable in your kernel by using menuconfig. it some time happens that some options of a same distro are not enabled in different versions.
I have run make meunconfig and have found the following
Processor type and features> Preemption Mode
Preemption Mode is set to "No Forced Preemption (Server))"
i believe it should be set to "(Complete Preemption (Real-Time))", but this option is missing from the list of expected 4 options (my list only has 3, No forced preemption, Voluntary Kernel and Preemptible Kernel)
Do I need to have the kernel-rt-source-2.6.17.14 installed not just linux-2.6.17-14mdv? Only problem i have is that this does not seem to exist... or is there a different rpm or patch that can do this?
Is it possible to use one of the other Preemption mode options?
Excuse any stupid comments, this is the first time i have done anything like this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.