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)
committerhskang <hs1218.kang@samsung.com>
Sun, 9 Sep 2018 21:36:49 +0000 (06:36 +0900)
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 e47bd0876999731ad94546279f5a54ed05fa72fc..14f047e73ec31d70f995bd619df6da5e7458e7c5 100644 (file)
@@ -58,6 +58,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 b54a4257257c18e920f50a77f5887d4065040110..f125d4fe1ec5e64bd273ee474f8a9b74f5c9f47b 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)