<div dir="ltr"><div><div>Hey Sreejith,<br><br></div><div></div><div><br></div>softirq&#39;s are run as bottom half processing (after an interrupt is handled or when there is no work to be done - <a href="https://www.kernel.org/doc/htmldocs/kernel-hacking/basics-softirqs.html">https://www.kernel.org/doc/htmldocs/kernel-hacking/basics-softirqs.html</a> ) and sched_softirq is one such soft irq whose only function is confined to the routine run_rebalance_domain().<br><br></div><br><div>__schedule() is the main scheduling function that tries to pick the next task and then perform context switch and other associated scheduling functions. Since run_rebalance_domain() need not be run at that exact time frame, it is scheduled for later time when the cpu can take it up using softirq&#39;s. Therefore __schedule() need not be called in this softirq context as such because these are independent operations.<br><br></div><div>Hope this helps.<br></div><div><br></div><div>Thanks and regards,<br>Vignesh Radhakrishnan<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 28, 2015 at 10:25 PM, Sreejith M M <span dir="ltr">&lt;<a href="mailto:sreejith.mm@gmail.com" target="_blank">sreejith.mm@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">Hi,<br>
<br>
I was reading LKD by Robert Love. I got the following idea from the book.<br>
<br>
<br>
Correct me if I am worng<br>
I was checking through source code and I found that on every timer<br>
interrupt, through sched/fair.c we are raising the SCHED_SOFTIRQ().<br>
I was checking the relation between SCHED_SOFTIRQ and actual<br>
__schedule() function.<br>
<br>
My assumption:<br>
schedule() function is the function which selects the processes which<br>
are ready to run  in run queue. schedule() function is called in every<br>
timer tick.<br>
<br>
What I was thinking is that schedule() will be called as part of<br>
handling SCHED_SOFTIRQ() . But in source code, SCHED_SOFTIRQ is<br>
handled through run_rebalance_domain() function (sched/fair.c) . I am<br>
unable to trace __schedule()  from this function.<br>
<br>
Am I missing anything or my assumptions are wrong?<br>
<span class="HOEnZb"><font color="#888888">--<br>
Regards,<br>
Sreejith<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">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></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><a href="http://vigneshradhakrishnan.blogspot.com/" target="_blank">http://vigneshradhakrishnan.blogspot.com/</a><br></div>
</div>