LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Is there any way that application thread can boost priority of Kernel thread in Linux (http://www.linuxquestions.org/questions/linux-kernel-70/is-there-any-way-that-application-thread-can-boost-priority-of-kernel-thread-in-linux-4175418183/)

Chetansingh Parihar 07-23-2012 02:29 AM

Is there any way that application thread can boost priority of Kernel thread in Linux
 
Question: Is there any way that application thread can boost priority of Kernel thread in real time Linux Kernel?

Background:
I am using Linux 2.6.14.7
In my software I have some application threads that run with real time scheduling policy - ‘SCHED_RR’ (Round Robin Policy) and with priority of 20.

I have requirement of sending a (custom) message over Ethernet in real-time.

When one of the application thread detects a particular condition I want to send one message over Ethernet to my client application that is connected.
Though I could see that my application thread is calling socket library send() system call in real time however the client application connected over Ethernet is unable to receive that message in real time.

My idea is – if I could increase the priority of Kernel thread that handles clearing of Ethernet Network Cache after calling socket library send() system call then I should be able to send the message over Ethernet in real time.

jefro 07-23-2012 07:30 PM

I'd consider paying for a real time linux or use qnx. The linux RT version was never very good and is all but gone in current kernels.

Chetansingh Parihar 07-24-2012 12:07 AM

Thanks for the response.
In my project we are using Linux Kernel provided by Wind River, exact version details - 2.6.14.7-tiny1-WR1.3al_small.
Workaround that i have found-
After calling the socket library send() if i make the application thread sleep, i could receive the message in client application in real time. I am not sure if this is right thing to do.
In my tests i could find that the sleep duration is dependent on the number of threads running in the system.

sundialsvcs 07-24-2012 04:29 PM

Having fast, dedicated hardware with nothing else to do is a plausible workaround but not guaranteed. Linux is not, and is not designed to be, a "real time" kernel. If at all possible, find a way to redesign the requirement so that there are greater timing tolerances. (You probably need to do that anyway if you are dealing with TCP/IP.)

Chetansingh Parihar 07-25-2012 01:05 AM

Thanks for the response.


All times are GMT -5. The time now is 04:56 AM.