Skip to contentSkip to conversation

No 100 HZ timer !

DISCUSSION [email protected] 2 participants 2 messages Apr 10, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines
Quoted 3 lines

Just how would you do kernel/user CPU time accounting then ? It's

currently done

Quoted 3 lines
Quoted 1 line

on every timer tick, and doing it less often would make it useless.

On the contrary doing it less often but at the right time massively

improves

Quoted 1 line

its accuracy. You do it on reschedule. An rdtsc instruction is cheap and

all

Quoted 1 line

of a sudden you have nearly cycle accurate accounting

If you do the accounting on reschedule, how do you find out how much time has been spent in user versus kernel mode? Or do the Intel chips have two counters, one for user space execution and one for the kernel?

blue skies,
Martin

Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH Schönaicherstr. 220, D-71032 Böblingen, Telefon: 49 - (0)7031 - 16-2247
E-Mail: [email protected]

#1 lore raw
Quoted 5 lines

If you do the accounting on reschedule, how do you find out how much ti= me
has been spent in user versus kernel mode? Or do the Intel chips have t= wo
counters, one for user space execution and one for the kernel?

Unfortunately not so you'd need to do a little bit per syscall, at least for non trivial syscalls.