lkml.org 
[lkml]   [2018]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/19] sched/numa: Set preferred_node based on best_cpu
On Mon, Jun 04, 2018 at 03:30:13PM +0530, Srikar Dronamraju wrote:
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index ea32a66..94091e6 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -1725,8 +1725,9 @@ static int task_numa_migrate(struct task_struct *p)
> * Tasks that are "trapped" in such domains cannot be migrated
> * elsewhere, so there is no point in (re)trying.
> */
> - if (unlikely(!sd)) {
> - p->numa_preferred_nid = task_node(p);
> + if (unlikely(!sd) && p->numa_preferred_nid != task_node(p)) {
> + /* Set the new preferred node */
> + sched_setnuma(p, task_node(p));
> return -EINVAL;
> }
>

That looks dodgy.. this would allow things to continue with !sd.

\
 
 \ /
  Last update: 2018-06-04 14:18    [W:0.259 / U:1.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site