Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
cpupri.c File Reference
#include <linux/gfp.h>
#include "cpupri.h"

Go to the source code of this file.

Functions

int cpupri_find (struct cpupri *cp, struct task_struct *p, struct cpumask *lowest_mask)
 
void cpupri_set (struct cpupri *cp, int cpu, int newpri)
 
int cpupri_init (struct cpupri *cp)
 
void cpupri_cleanup (struct cpupri *cp)
 

Function Documentation

void cpupri_cleanup ( struct cpupri cp)

cpupri_cleanup - clean up the cpupri structure : The cpupri context

Definition at line 234 of file cpupri.c.

int cpupri_find ( struct cpupri cp,
struct task_struct p,
struct cpumask lowest_mask 
)

cpupri_find - find the best (lowest-pri) CPU in the system : The cpupri context : The task : A mask to fill in with selected CPUs (or NULL)

Note: This function returns the recommended CPUs as calculated during the current invocation. By the time the call returns, the CPUs may have in fact changed priorities any number of times. While not ideal, it is not an issue of correctness since the normal rebalancer logic will correct any discrepancies created by racing against the uncertainty of the current priority configuration.

Returns: (int)bool - CPUs were found

Definition at line 65 of file cpupri.c.

int cpupri_init ( struct cpupri cp)

cpupri_init - initialize the cpupri structure : The cpupri context

Returns: -ENOMEM if memory fails.

Definition at line 206 of file cpupri.c.

void cpupri_set ( struct cpupri cp,
int  cpu,
int  newpri 
)

cpupri_set - update the cpu priority setting : The cpupri context : The target cpu : The priority (INVALID-RT99) to assign to this CPU

Note: Assumes cpu_rq(cpu)->lock is locked

Returns: (void)

Definition at line 138 of file cpupri.c.