Properly reset load on non-cpu topology objects
cpus properly use a delta value for load comparisons, but other objects just accumulate the load from their children in perpetuity. we should reset the load value on all non-cpu objects so that they too operate on a delta from the last load value. Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
This commit is contained in:
parent
bb66713051
commit
d8823b7565
|
@ -176,6 +176,14 @@ static void compute_irq_branch_load_share(struct topo_obj *d, void *data __attri
|
|||
d->parent->load += d->load;
|
||||
}
|
||||
|
||||
static void reset_load(struct topo_obj *d, void *data __attribute__((unused)))
|
||||
{
|
||||
if (d->parent)
|
||||
reset_load(d->parent, NULL);
|
||||
|
||||
d->load = 0;
|
||||
}
|
||||
|
||||
void parse_proc_stat()
|
||||
{
|
||||
FILE *file;
|
||||
|
@ -243,6 +251,11 @@ void parse_proc_stat()
|
|||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset the load values for all objects above cpus
|
||||
*/
|
||||
for_each_object(cache_domains, reset_load, NULL);
|
||||
|
||||
/*
|
||||
* Now that we have load for each cpu attribute a fair share of the load
|
||||
* to each irq on that cpu
|
||||
|
|
Loading…
Reference in a new issue