On Tue, Jan 21, 2014 at 05:20:05PM -0500, [email protected] wrote: > From: Rik van Riel <[email protected]> > > Track which nodes NUMA faults are triggered from, in other words > the CPUs on which the NUMA faults happened. This uses a similar > mechanism to what is used to track the memory involved in numa faults. > > The next patches use this to build up a bitmap of which nodes a > workload is actively running on. > > Cc: Peter Zijlstra <[email protected]> > Cc: Mel Gorman <[email protected]> > Cc: Ingo Molnar <[email protected]> > Cc: Chegu Vinod <[email protected]> > Signed-off-by: Rik van Riel <[email protected]> > --- > include/linux/sched.h | 10 ++++++++-- > kernel/sched/fair.c | 30 +++++++++++++++++++++++------- > 2 files changed, 31 insertions(+), 9 deletions(-) > > diff --git a/include/linux/sched.h b/include/linux/sched.h > index b8f8476..d14d9fe 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -1492,6 +1492,14 @@ struct task_struct { > unsigned long *numa_faults_buffer_memory; > > /* > + * Track the nodes where faults are incurred. This is not very > + * interesting on a per-task basis, but it help with smarter > + * numa memory placement for groups of processes. > + */ > + unsigned long *numa_faults_cpu; > + unsigned long *numa_faults_buffer_cpu; > +
/* * Track the nodes the process was running on when a NUMA hinting fault * was incurred ...... */ ? Otherwise the comment is very similar to numa_faults_memory. I'm not that bothered because the name is descriptive enough. > + /* > * numa_faults_locality tracks if faults recorded during the last > * scan window were remote/local. The task scan period is adapted > * based on the locality of the faults with different weights > @@ -1594,8 +1602,6 @@ extern void task_numa_fault(int last_node, int node, > int pages, int flags); > extern pid_t task_numa_group_id(struct task_struct *p); > extern void set_numabalancing_state(bool enabled); > extern void task_numa_free(struct task_struct *p); > - > -extern unsigned int sysctl_numa_balancing_migrate_deferred; > #else > static inline void task_numa_fault(int last_node, int node, int pages, > int flags) Should this hunk move to patch 1? Whether you make the changes or not Acked-by: Mel Gorman <[email protected]> In my last review I complained about magic numbers but I see a later patch has a subject that at least implies it deals with the numbers. -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

