sched: ems: update topology after energy table creation
authorPark Bumgyu <bumgyu.park@samsung.com>
Thu, 9 Aug 2018 04:54:59 +0000 (13:54 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:24:56 +0000 (20:24 +0300)
Change-Id: I12c66b041b801c331d1b631b035bf99d07af763f
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
drivers/base/arch_topology.c
include/linux/arch_topology.h
kernel/sched/ems/energy.c

index 88c9a697e81914908e2c078a97a44a191c148ebe..91dae6545be292effb513b85dffa2600a1d4cbca 100644 (file)
@@ -81,6 +81,12 @@ static ssize_t cpu_capacity_show(struct device *dev,
 static void update_topology_flags_workfn(struct work_struct *work);
 static DECLARE_WORK(update_topology_flags_work, update_topology_flags_workfn);
 
+void topology_update(void)
+{
+       if (topology_detect_flags())
+               schedule_work(&update_topology_flags_work);
+}
+
 static ssize_t cpu_capacity_store(struct device *dev,
                                  struct device_attribute *attr,
                                  const char *buf,
index b6ebce008c190c3e14b805fde3ca2d9ad53ae2f5..3ffd248c6b858b460f2cda2d05c8e537810de4ab 100644 (file)
@@ -15,6 +15,7 @@ int topology_core_flags(void);
 int topology_cluster_flags(void);
 int topology_cpu_flags(void);
 int topology_update_cpu_topology(void);
+void topology_update(void);
 
 struct device_node;
 bool topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu);
index d7a13a35e642eb53587b151dde824e22e27aaf1a..e55fe5986e8c5c972d143aabfc4cdfca8e623044 100644 (file)
@@ -479,6 +479,8 @@ void init_sched_energy_table(struct cpumask *cpus, int table_size,
                        update_group_capacity(sd, cpu);
                rcu_read_unlock();
        }
+
+       topology_update();
 }
 
 static int __init init_sched_energy_data(void)