Skip to contentSkip to conversation

::wiggle() - what does that do?

Powertop Ivan Shapovalov 2 participants 5 messages Mar 19, 2013

lore
Share & tools
lore

Ivan Shapovalov

author
#0 lore raw

Hello all,

I've been wondering on what does the abstract_cpu::wiggle() function does and why it is needed?.. All the code says is that it is needed to "have a record of CPU at the start and end of the perf trace".

I'm asking just because I feel somewhat uncomfortable to have powertop changing my scaling frequency back and forth each N seconds. :)

Thanks,
- Ivan

#1 lore raw
Quoted 8 lines · Ivan Shapovalov

Hello all,

I've been wondering on what does the abstract_cpu::wiggle() function does and why it is needed?.. All the code says is that it is needed to "have a record of CPU at the start and end of the perf trace".

I'm asking just because I feel somewhat uncomfortable to have powertop changing my scaling frequency back and forth each N seconds. :)

the reason this exists is that powertop wants to track what frequency the cpu is at for the duration... ... and there's no way to ask for "current", only to get change notifications

so wiggle() forces a change... and from then on we know what it's at.

author
#2 lore raw
Quoted 7 lines · On 19 March 2013 12:53:26 Arjan van de Ven wrote:
Quoted 6 lines · Ivan Shapovalov

Hello all,

I've been wondering on what does the abstract_cpu::wiggle() function does and why it is needed?.. All the code says is that it is needed to "have a record of CPU at the start and end of the perf trace".

Quoted 8 lines
Quoted 2 lines

I'm asking just because I feel somewhat uncomfortable to have powertop changing my scaling frequency back and forth each N seconds. :)

the reason this exists is that powertop wants to track what frequency the cpu is at for the duration... ... and there's no way to ask for "current", only to get change notifications

so wiggle() forces a change... and from then on we know what it's at.

...And why isn't it possible to keep the value from last notification? Because time can pass between measurement end and new measurement start?

Sorry for stupid questions.

#3 lore raw
Quoted 11 lines · Ivan Shapovalov
Quoted 10 lines · On 19 March 2013 12:53:26 Arjan van de Ven wrote:
Quoted 8 lines · Ivan Shapovalov

Hello all,

I've been wondering on what does the abstract_cpu::wiggle() function does and why it is needed?.. All the code says is that it is needed to "have a record of CPU at the start and end of the perf trace".

I'm asking just because I feel somewhat uncomfortable to have powertop changing my scaling frequency back and forth each N seconds. :)

Quoted 7 lines
Quoted 5 lines

the reason this exists is that powertop wants to track what frequency the cpu is at for the duration... ... and there's no way to ask for "current", only to get change notifications

so wiggle() forces a change... and from then on we know what it's at.

...And why isn't it possible to keep the value from last notification?

there may not have been one...

Quoted 1 line

Because time can pass between measurement end and new measurement start?

yep

author
#4 lore raw
Quoted 21 lines · On 19 March 2013 12:58:49 Arjan van de Ven wrote:
Quoted 20 lines · Ivan Shapovalov
Quoted 18 lines · On 19 March 2013 12:53:26 Arjan van de Ven wrote:
Quoted 10 lines · Ivan Shapovalov

Hello all,

I've been wondering on what does the abstract_cpu::wiggle() function does
and why it is needed?.. All the code says is that it is needed to "have a
record of CPU at the start and end of the perf trace".

I'm asking just because I feel somewhat uncomfortable to have powertop changing my scaling frequency back and forth each N seconds. :)

the reason this exists is that powertop wants to track what frequency the cpu is at for the duration... ... and there's no way to ask for "current",
only to get change notifications

so wiggle() forces a change... and from then on we know what it's at.

Quoted 7 lines
Quoted 1 line

...And why isn't it possible to keep the value from last notification?

there may not have been one...

Quoted 1 line

Because time can pass between measurement end and new measurement start?

yep

Thanks. It's clear to me now.