[PATCH 1/1] irqbalance: Fix min_load to pick actual min load across all objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <alakeshh at amazon.com>
Signed-off-by: Vallish Vaidyeshwara <vallish at amazon.com>
---
 irqlist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/irqlist.c b/irqlist.c
index f727e3d..95ccc7a 100644
--- a/irqlist.c
+++ b/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;
-- 
2.7.5




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux