LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-09-2011, 08:42 AM   #1
jrkwon
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Rep: Reputation: 0
Question "idle_balance()" is properly called in schedule()?


I may have some confusion but the below code should be changed to using "likely" macro?

schedule()
{
...
if(unlikely(!rq->nr_running))
idle_balance(cpu, rq);
...
}

In my understanding, the idle_balance() seems have to be called when there is no active tasks (nr_running == 0).

Any comment would be highly appreciated.

Thanks.
 
Old 02-09-2011, 10:12 PM   #2
jrkwon
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Original Poster
Rep: Reputation: 0
My big mistake on "unlikely" macro...
The original sentence is absolutely correct.
 
  


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
how can i create a global variable called "dogpatch" with a value of "woof" earthdog Linux - Newbie 9 12-15-2009 02:03 AM
ACPI S3 (so-called "Standby" or "Sleep") in GNU/Linux posix_memalign Linux - Laptop and Netbook 1 01-17-2009 02:54 PM
I hate to be called a "CODER", "PROGRAMMER"...when.. StevenO General 5 08-01-2007 04:34 PM
how to schedule an "at" job to start when another finishes? ashlock Programming 10 01-14-2005 12:12 AM
(1) Realtek card is called "tulip", (2) dynamic IP makes eth0 down Erhan Linux - Networking 3 12-31-2003 03:54 AM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration