Re: [PATCH 29/31] sched: numa: CPU follows memory

From: Mel Gorman
Date: Wed Nov 14 2012 - 06:20:15 EST


On Tue, Nov 13, 2012 at 11:12:58AM +0000, Mel Gorman wrote:
> @@ -864,6 +1106,21 @@ void task_numa_fault(int node, int pages, bool misplaced)
> task_numa_placement(p);
> }
>
> +static void reset_ptenuma_scan(struct task_struct *p)
> +{
> + ACCESS_ONCE(p->mm->numa_scan_seq)++;
> +
> + if (p->mm && p->mm->mm_balancenuma)
> + p->mm->mm_balancenuma->mm_numa_fault_tot >>= 1;
> + if (p->task_balancenuma) {
> + int nid;
> + p->task_balancenuma->task_numa_fault_tot >>= 1;
> + for_each_online_node(nid) {
> + p->task_balancenuma->task_numa_fault[nid] >>= 1;
> + }
> + }
> +}

Overnight tests indicated that cpu-follows is currently broken in this
series but a large part of the problem is a missing

p->mm->numa_scan_offset = 0;

here. means that all tasks are only considered for convergence once without
proper resetting of the scanner. It's effectly becomes the vanilla kernel
with a bunch of system CPU overhead.

Of course it's not the only problem with this patch as the overhead of
finding a proper placement is mnassive and due to the slow scanning rate,
it converges very slowly. While it's based on autonuma, autonuma did the
same job outside the context of a process so it's not exactly equivalent.

--
Mel Gorman
SUSE Labs
--
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/