lkml.org 
[lkml]   [2021]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6] sched: migration changes for core scheduling
On Fri, Mar 19, 2021 at 04:32:48PM -0400, Joel Fernandes (Google) wrote:
> @@ -7530,8 +7543,9 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
> * We do not migrate tasks that are:
> * 1) throttled_lb_pair, or
> * 2) cannot be migrated to this CPU due to cpus_ptr, or
> - * 3) running (obviously), or
> - * 4) are cache-hot on their current CPU.
> + * 3) task's cookie does not match with this CPU's core cookie
> + * 4) running (obviously), or
> + * 5) are cache-hot on their current CPU.
> */
> if (throttled_lb_pair(task_group(p), env->src_cpu, env->dst_cpu))
> return 0;
> @@ -7566,6 +7580,13 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
> return 0;
> }
>
> + /*
> + * Don't migrate task if the task's cookie does not match
> + * with the destination CPU's core cookie.
> + */
> + if (!sched_core_cookie_match(cpu_rq(env->dst_cpu), p))
> + return 0;
> +
> /* Record that we found atleast one task that could run on dst_cpu */
> env->flags &= ~LBF_ALL_PINNED;
>

This one is too strong.. persistent imbalance should be able to override
it.

\
 
 \ /
  Last update: 2021-03-20 16:38    [W:0.124 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site