LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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-31-2011, 12:56 AM   #1
reg13
LQ Newbie
 
Registered: Jun 2011
Posts: 19

Rep: Reputation: Disabled
Question why does SCHED_FIFO task on one CPU affects other CPU tasks on a multy core system?


I have a 4core maching(hyperthreading disabled), SUSE linux 2.6.32, SMP & RT group scheduling enabled, at the boot time all the OS/kernel and other applications are limited to first 2 cores. (using isolcpu)
my need is that I have 2 CPU bound processes (p1 & P2), I want them to 100% occupy the next 2 CPUs separately. And to give them SHED_FIFO policy with 99 priority.

I have successfully bound the processes with sched_setaffinity. Initially P1 & P2 are both working almost 100% CPU (with SCHED_OTHER) each on CPU3 & CPU4 respectively.

But the problem comes when they are given SCHED_FIFO. When P1 is set to SHED_FIFO (still p2 on SCHED_OTHER),
chrt -f -p 99 (pid of P1)
The whole system become almost not responding, where i cant even execute the same command for P2.

But in theory, since there are 4 CPUs, one RT task with max priority on one CPU should not affect the tasks or the OS on other CPUs.

Im trying to understand why this happens, any one have an idea? ( why just one SHED_FIFO task freezes a whole multy core system?)

I'm really stuck with this problem, expecting some expert advice.
Thankx in advance.
 
Old 07-31-2011, 02:52 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Why do you need SCHED_FIFO for them? There's some kernel stuff that needs to be running from time to time (workqueues...) and if your threads are not releasing the CPUs, you may get the result as observed. Normally, a SCHED_FIFO thread will run just for a small amount of time and release the CPU.
 
Old 07-31-2011, 09:48 PM   #3
reg13
LQ Newbie
 
Registered: Jun 2011
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Mara View Post
Why do you need SCHED_FIFO for them?
The need is, I want to give p1 & p2 maximum CPU time and minimum latency.
Quote:
There's some kernel stuff that needs to be running from time to time (workqueues...) and if your threads are not releasing the CPUs, you may get the result as observed. Normally, a SCHED_FIFO thread will run just for a small amount of time and release the CPU.
But do they need to run on each CPU ?, what I was thinking it that, since I have delegated two CPUs for OS and kernel, Other CPUs will not be needed by the OS/kernel. Am I wrong ?

Thankx.

Last edited by reg13; 08-01-2011 at 08:30 AM.
 
  


Reply



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
Problem in binding a process to CPU in multy core system reg13 Linux - Kernel 4 07-26-2011 11:17 PM
AMD CPU Generating Way More System Load Than Intel Xeon CPU? kresyzig Programming 1 10-11-2010 09:35 AM
How to find what task is running on a particular cpu core ? summer_intern Linux - General 2 09-17-2010 09:29 PM
how to find on which cpu core linux kernel tasks are running zzfcpit0120 Linux - Kernel 1 10-16-2009 05:05 AM
cpu frequency scaling with Pentium(R) Dual-Core CPU E5200 @ 2.50GHz tramni1980 Slackware 5 08-16-2009 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:40 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration