Re: scheduler_tick() confusing comment: called from fork code

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

 



On Wed, Dec 8, 2010 at 7:19 AM, Mulyadi Santosa
<mulyadi.santosa@xxxxxxxxx> wrote:
> dear Lalit...
>
> On Tue, Dec 7, 2010 at 11:53, lalit mohan tripathi
> <lalit.tripathi@xxxxxxxxx> wrote:
>> I have suspicion on second line (It also.... timeslices.), is that
>> statement true?
>>
>> 3567 * This function gets called by the timer code, with HZ frequency.
>> 3568 * We call it with interrupts disabled.
>> 3569 *
>> 3570 * It also gets called by the fork code, when changing the parent's
>> 3571 * timeslices.
>> 3572 */
>> 3573void scheduler_tick(void)
>> 3574{
>
> It's hard to find the trace, but I have a guess that when parent's
> timeslice is changed (not sure why it should have impact to its
> children), timer interrupt is reenabled...thus indirectly trigerring
> scheduler_tick. While scheduler_tick itself is called in every timer
> tick.
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>
Hi Mulyadi Santosa,
  Thanks for your reply.   The global timer interrupt is called
periodically at the HZ frequency (or as set for per-cpu local timers
in case of SMP).
  Can you shed more light about what you mean by "timer interrupt is reenabled"?
  In my thinking timer interrupt (single-core: global timer interrupt,
SMP: local timer interrupt) would anyway run at regular interval
(unless preemption is disabled for brief moment).

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[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