[PATCH] precise time accounting using TSC for 2.2.14

Jan Astalos astalos en tuke.sk
Vie Ene 28 06:36:58 CST 2000


This patch contains improved time accounting for uniprocessor machines
with TSC counter. 

Problem: Accounting of process time is done in time handler every clock
tick. If process releases CPU before clock tick, used time is accounted
to next running process or idle process. It is possible to make process
that uses up to 30% of CPU time but is not reported to be running at
all.

Solution: To count short slices at context switch and to add accumulated
jiffies to utime in time handler. I tested it on my K6 and I didn't
noticed any nasty side effects. Tests are OK now...

Yes. Used time is still not split correctly, but sum of utime and stime
should be correct now. I don't want to put any additional overhead on
system calls. If someone will improve the patch, and/or rewrite it for
SMP machines, I would like to have a copy. Also, if I missed something
please send me a note (cc it to my address). Thanks.

Jan

PS: I know that everyone will read the patch before using it :-), but
just for the case: there is new parameter in kernel config in 'General
setup' group, active only if you select TSC machine and no SMP support.
------------ próxima parte ------------
A non-text attachment was scrubbed...
Name: precacct.patch.gz
Type: application/x-gzip
Size: 2259 bytes
Desc: no disponible
URL: <https://lists.srvr.mx/pipermail/ayuda/attachments/20000128/7c0f4f23/attachment.bin>


Más información sobre la lista de distribución Ayuda