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

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

 



Hi,

It seems that this is obsolete.. There is a call in 2.6.12.6 kernel (during fork), but not in the latest kernel. Please refer to:
http://lxr.linux.no/linux+v2.6.12/kernel/sched.c
  

On Wed, Dec 8, 2010 at 6:33 PM, lalit mohan tripathi <lalit.tripathi@xxxxxxxxx> wrote:
On Wed, Dec 8, 2010 at 1:29 PM, Mulyadi Santosa
> Hi Lalit...
>
> On Wed, Dec 8, 2010 at 13:15, lalit mohan tripathi
>>  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
>
Thanks for sharing your opinion.  So, it means that the comment ("this
function (scheduler_tick) is also called
when parent's time slice is recalculated") is incorrect or has become
obsolete in new kernel codes (currently 2.6.30 ~ 2.6.36).
Can anybody confim about it?

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




--
Regards,
Himanshu

[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