diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index e5f39e8dfe53..4ac60b296d96 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1450,14 +1450,12 @@ static unsigned long capacity_of(int cpu); /* Cached statistics for all CPUs within a node */ struct numa_stats { - unsigned long nr_running; unsigned long load; /* Total compute capacity of CPUs on a node */ unsigned long compute_capacity; - /* Approximate capacity in terms of runnable tasks on a node */ - unsigned long task_capacity; + unsigned int nr_running; int has_free_capacity; }; @@ -1495,9 +1493,9 @@ static void update_numa_stats(struct numa_stats *ns, int nid) smt = DIV_ROUND_UP(SCHED_CAPACITY_SCALE * cpus, ns->compute_capacity); capacity = cpus / smt; /* cores */ - ns->task_capacity = min_t(unsigned, capacity, + capacity = min_t(unsigned, capacity, DIV_ROUND_CLOSEST(ns->compute_capacity, SCHED_CAPACITY_SCALE)); - ns->has_free_capacity = (ns->nr_running < ns->task_capacity); + ns->has_free_capacity = (ns->nr_running < capacity); } struct task_numa_env {