Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
x86_energy_perf_policy.c File Reference
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/resource.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/time.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Macros

#define MSR_IA32_ENERGY_PERF_BIAS   0x000001b0
 
#define BIAS_PERFORMANCE   0
 
#define BIAS_BALANCE   6
 
#define BIAS_POWERSAVE   15
 

Functions

void usage (void)
 
void cmdline (int argc, char **argv)
 
void validate_cpuid (void)
 
unsigned long long get_msr (int cpu, int offset)
 
unsigned long long put_msr (int cpu, unsigned long long new_msr, int offset)
 
void print_msr (int cpu)
 
void update_msr (int cpu)
 
void for_every_cpu (void(func)(int))
 
int main (int argc, char **argv)
 

Variables

unsigned int verbose
 
unsigned int read_only
 
charprogname
 
unsigned long long new_bias
 
int cpu = -1
 
charproc_stat = "/proc/stat"
 

Macro Definition Documentation

#define BIAS_BALANCE   6

Definition at line 75 of file x86_energy_perf_policy.c.

#define BIAS_PERFORMANCE   0

Definition at line 74 of file x86_energy_perf_policy.c.

#define BIAS_POWERSAVE   15

Definition at line 76 of file x86_energy_perf_policy.c.

#define MSR_IA32_ENERGY_PERF_BIAS   0x000001b0

Definition at line 72 of file x86_energy_perf_policy.c.

Function Documentation

void cmdline ( int  argc,
char **  argv 
)

Definition at line 78 of file x86_energy_perf_policy.c.

void for_every_cpu ( void(func)(int )

Definition at line 268 of file x86_energy_perf_policy.c.

unsigned long long get_msr ( int  cpu,
int  offset 
)

Definition at line 187 of file x86_energy_perf_policy.c.

int main ( int  argc,
char **  argv 
)

Definition at line 299 of file x86_energy_perf_policy.c.

void print_msr ( int  cpu)

Definition at line 245 of file x86_energy_perf_policy.c.

unsigned long long put_msr ( int  cpu,
unsigned long long  new_msr,
int  offset 
)

Definition at line 212 of file x86_energy_perf_policy.c.

void update_msr ( int  cpu)

Definition at line 251 of file x86_energy_perf_policy.c.

void usage ( void  )

Definition at line 64 of file x86_energy_perf_policy.c.

void validate_cpuid ( void  )

Definition at line 137 of file x86_energy_perf_policy.c.

Variable Documentation

int cpu = -1

Definition at line 38 of file x86_energy_perf_policy.c.

unsigned long long new_bias

Definition at line 37 of file x86_energy_perf_policy.c.

char* proc_stat = "/proc/stat"

Definition at line 264 of file x86_energy_perf_policy.c.

char* progname

Definition at line 36 of file x86_energy_perf_policy.c.

unsigned int read_only

Definition at line 35 of file x86_energy_perf_policy.c.

unsigned int verbose

Definition at line 34 of file x86_energy_perf_policy.c.