Re: Use of SCHED_SOFTIRQ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Sreejith,


softirq's are run as bottom half processing (after an interrupt is handled or when there is no work to be done - https://www.kernel.org/doc/htmldocs/kernel-hacking/basics-softirqs.html ) and sched_softirq is one such soft irq whose only function is confined to the routine run_rebalance_domain().


__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's. Therefore __schedule() need not be called in this softirq context as such because these are independent operations.

Hope this helps.

Thanks and regards,
Vignesh Radhakrishnan

On Wed, Jan 28, 2015 at 10:25 PM, Sreejith M M <sreejith.mm@xxxxxxxxx> wrote:
Hi,

I was reading LKD by Robert Love. I got the following idea from the book.


Correct me if I am worng
I was checking through source code and I found that on every timer
interrupt, through sched/fair.c we are raising the SCHED_SOFTIRQ().
I was checking the relation between SCHED_SOFTIRQ and actual
__schedule() function.

My assumption:
schedule() function is the function which selects the processes which
are ready to run  in run queue. schedule() function is called in every
timer tick.

What I was thinking is that schedule() will be called as part of
handling SCHED_SOFTIRQ() . But in source code, SCHED_SOFTIRQ is
handled through run_rebalance_domain() function (sched/fair.c) . I am
unable to trace __schedule()  from this function.

Am I missing anything or my assumptions are wrong?
--
Regards,
Sreejith

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



--
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux