Browse files

Fix min_load to pick actual min load across all objects

find_overloaded_objs() calls gather_load_stats() to get stats across
all objects to help migrate overloaded IRQ's. There is a bug in
gather_load_stats() to pick min_load across all objects when the
first object's load is 0.

Eg with 2 objects: obj1->load = 0 and obj2->load = 5000
During first iteration, info->min_load will be 0.
However during second iteration, info->min_load will be 5000.
This flaw in the logic doesn't allow IRQ's to be migrated as it
ends up picking the overloaded core as the one with min load.

Reviewed-by: Alakesh Haloi <>
Signed-off-by: Vallish Vaidyeshwara <>
Signed-off-by: Neil Horman <>
  • Loading branch information...
Neil Horman Neil Horman
Neil Horman authored and Neil Horman committed Nov 15, 2017
1 parent 85a8745 commit 723c41c1ef609dfe3829e536f2748903e9ab62ed
Showing with 1 addition and 1 deletion.
  1. +1 −1 irqlist.c
@@ -55,7 +55,7 @@ static void gather_load_stats(struct topo_obj *obj, void *data)
struct load_balance_info *info = data;
if (info->min_load == 0 || obj->load < info->min_load)
if (info->load_sources == 0 || obj->load < info->min_load)
info->min_load = obj->load;
info->total_load += obj->load;
info->load_sources += 1;

0 comments on commit 723c41c

Please sign in to comment.