LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 07-23-2012, 02:29 AM   #1
Chetansingh Parihar
LQ Newbie
 
Registered: Jul 2012
Location: Bangalore,India
Posts: 5

Rep: Reputation: Disabled
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.
 
Old 07-23-2012, 07:30 PM   #2
jefro
Guru
 
Registered: Mar 2008
Posts: 11,116

Rep: Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362
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.
 
1 members found this post helpful.
Old 07-24-2012, 12:07 AM   #3
Chetansingh Parihar
LQ Newbie
 
Registered: Jul 2012
Location: Bangalore,India
Posts: 5

Original Poster
Rep: Reputation: Disabled
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.
 
Old 07-24-2012, 04:29 PM   #4
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,263

Rep: Reputation: 1085Reputation: 1085Reputation: 1085Reputation: 1085Reputation: 1085Reputation: 1085Reputation: 1085Reputation: 1085
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.)
 
1 members found this post helpful.
Old 07-25-2012, 01:05 AM   #5
Chetansingh Parihar
LQ Newbie
 
Registered: Jul 2012
Location: Bangalore,India
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks for the response.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
no difference seen even after setting application thread priority in linux environmen rahimlnx Linux - Embedded & Single-board computer 4 11-21-2010 08:15 AM
How can I know the priority of a kernel thread? corone Linux - General 2 10-05-2010 09:56 PM
how to configure linux kernel thread for dynamic priority kishor chalukkil Linux - Newbie 0 04-18-2009 01:37 PM
priority for kernel thread? VGM Programming 0 04-15-2009 11:31 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration