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

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

 



Hi Lalit...

On Wed, Dec 8, 2010 at 13:15, lalit mohan tripathi
<lalit.tripathi@xxxxxxxxx> wrote:

>  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).

OK, since I am more or less as clueless as you are (can't find any
exact code trace so far), so I'd just share my suspicion:

As the comment says "this function (scheduler_tick) is also called
when parent's time slice is recalculated", I highly suspect that at
that "recalculation" stage, timer interrupt is disabled. Thus,
scheduler_tick...for few moments is also skipped.

Why I guess so? If recalculation happen and at the same time timer
interrupt is still "running", quite likely one will disrupt other. The
net result: time slice final value isn't as expected.

Once the recalculation is done, timer interrupt should be re-enabled.
Thus, at this point, scheduler tick...indirectly is also called.


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

--
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