<br><br><div class="gmail_quote">On Wed, Sep 21, 2011 at 5:15 PM, rohan puri <span dir="ltr">&lt;<a href="mailto:rohan.puri15@gmail.com">rohan.puri15@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote"><div class="im">On Wed, Sep 21, 2011 at 4:46 PM, Murali N <span dir="ltr">&lt;<a href="mailto:nalajala.murali@gmail.com" target="_blank">nalajala.murali@gmail.com</a>&gt;</span> wrote:<br>
</div><div><div></div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
Can somebody give pointers to the load balancing scheduler on Linux. I<br>
hope this is the default scheduler which is used on most of the linux<br>
systems on SMP environment.<br>
I would like to know how the scheduler takes a decision to migrate<br>
some of the processes to the another core?<br>
<br>
I have a scenario like below:<br>
<br>
If CORE0 is running per say 2 threads which can be handled by CORE0<br>
itself ( by running at higher frequencies ) without enabling the CORE1<br>
( put into some low power mode ).<br>
How the scheduler takes this kind of decision intelligently!!!<br>
<font color="#888888"><br>
--<br>
Regards,<br>
Murali N<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</font></blockquote></div></div></div>Hi, <br><br>You can refer the link <a href="http://www.ibm.com/developerworks/linux/library/l-scheduler/" target="_blank">http://www.ibm.com/developerworks/linux/library/l-scheduler/</a><br>
<br>Also, there is a notion of processor affinity, in linux one can set the processe&#39;s affinity with the taskset command.<br>
<br>Either user can set this affinity thing or the 
       scheduler attempts to keep processes on the same CPU as long as practical for performance reasons.<br><br>Regards,<br><font color="#888888">Rohan Puri<br>
</font></blockquote></div><br>For normal SMP case, load balancing is enabled by default. There is one global variable in linux kernel scheduler code named &quot;sched_mc_power_savings&quot;. If is accessible through<tt> </tt><span style="font-family: arial,helvetica,sans-serif;">/sys/devices/system/cpu. If this is set to one, it changes the scheduler load balancing code to gather processes to run on small no of CPUs, if the load is less then there maybe some CPUs idle which would then be put in deep sleep which results in low power consumption.<br>
<br>Regards,<br>Rohan Puri<br></span>