Re: [PATCH] numa,sched: only consider less busy nodes as numa balancing destination
From: Peter Zijlstra
Date: Wed May 13 2015 - 02:31:01 EST
On Wed, May 13, 2015 at 08:29:06AM +0200, Peter Zijlstra wrote:
> @@ -1572,9 +1582,10 @@ static void numa_migrate_preferred(struct task_struct *p)
> * are added when they cause over 6/16 of the maximum number of faults, but
> * only removed when they drop below 3/16.
> */
> -static void update_numa_active_node_mask(struct numa_group *numa_group)
> +static bool update_numa_active_node_mask(struct numa_group *numa_group)
> {
> unsigned long faults, max_faults = 0;
> + bool update = false;
> int nid;
>
> for_each_online_node(nid) {
> @@ -1586,11 +1597,17 @@ static void update_numa_active_node_mask(struct numa_group *numa_group)
> for_each_online_node(nid) {
> faults = group_faults_cpu(numa_group, nid);
> if (!node_isset(nid, numa_group->active_nodes)) {
> - if (faults > max_faults * 6 / 16)
> + if (faults > max_faults * 6 / 16) {
> node_set(nid, numa_group->active_nodes);
> - } else if (faults < max_faults * 3 / 16)
> + update = true;
> + }
> + } else if (faults < max_faults * 3 / 16) {
> node_clear(nid, numa_group->active_nodes);
> + update = true;
> + }
> }
> +
> + return update;
> }
>
> /*
Ignore these hunks, they're dead wood.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/