Skip to content

Commit

Permalink
sched/numa: Update the scan period without holding the numa_group lock
Browse files Browse the repository at this point in the history
The metrics for updating scan periods are local or task specific.
Currently this update happens under the numa_group lock, which seems
unnecessary. Hence move this update outside the lock.

Running SPECjbb2005 on a 4 node machine and comparing bops/JVM
JVMS  LAST_PATCH  WITH_PATCH  %CHANGE
16    25355.9     25645.4     1.141
1     72812       72142       -0.92

Signed-off-by: Srikar Dronamraju <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Rik van Riel <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
srikard authored and Ingo Molnar committed Jul 25, 2018
1 parent 2d4056f commit 30619c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -2170,8 +2170,6 @@ static void task_numa_placement(struct task_struct *p)
}
}

update_task_scan_period(p, fault_types[0], fault_types[1]);

if (p->numa_group) {
numa_group_count_active_nodes(p->numa_group);
spin_unlock_irq(group_lock);
Expand All @@ -2186,6 +2184,8 @@ static void task_numa_placement(struct task_struct *p)
if (task_node(p) != p->numa_preferred_nid)
numa_migrate_preferred(p);
}

update_task_scan_period(p, fault_types[0], fault_types[1]);
}

static inline int get_numa_group(struct numa_group *grp)
Expand Down

0 comments on commit 30619c8

Please sign in to comment.