Balbir Singh wrote:
> Jay Lan wrote:
> > I figured this out. The tsk->stime (and utime as well) are
> > charged by 1 tick (or cputime) from the timer interrupt handler
> > through update_process_times->account_{user,system}_time.
> >
> > The clock resolution is a tick. Any short process less than
> > 1 tick will the counter being 0. It can be from 0 to 0.99999...
> > tick. A half tick is the average value.
>
> But the scheduling happens in the granularity of a tick, so the minimum
> each task gets is a tick.
>
> > I think it makes more sense to assign a half tick than assign
> > 1 usec to the stime. What do you think? Certainly the code need
> > better explanation.
>
> Can't we leave these values as zero in case both stime and utime are zero.
FYI, see "Incorrect CPU process accounting using CONFIG_HZ=100" thread.
IMHO, in-lined process accounting is probably critical for successful
scheduling.
Thanks!
--
Al
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]