Skip to contentSkip to conversation

How is user space notified of CPU speed changes?

DISCUSSION Andi Kleen 1 participant 1 message Oct 23, 2004 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1098399709.4131.23.camel@krustophenia.net.suse.lists.linux.kernel

A message that is not in the archive (sent off-list or not yet received): 1098444170.19459.7.camel@localhost.localdomain.suse.lists.linux.kernel

A message that is not in the archive (sent off-list or not yet received): 1098508238.13176.17.camel@krustophenia.net.suse.lists.linux.kernel

A message that is not in the archive (sent off-list or not yet received): 1098566366.24804.8.camel@localhost.localdomain.suse.lists.linux.kernel

Andi Kleen

author
#4 lore raw
Quoted 7 lines · Alan Cox

It did

- The kernel doesn't always know
- CPU speed is meaningless in hyper-threading since performance is not x2 for two cores but instead varies
- It doesn't handle split CPU speed SMP - where CPU speeds vary
- God help you if virtualised

Even without virtualization it doesn't make much sense to know the exact CPU speed for an user process: it never knows how much CPU time it will get (even with real time scheduling there could be even higher priority processes)

The solution is to call gettimeofday frequently to resychronize. It should be cheap enough that it isn't a big issue.

-Andi