lkml.org 
[lkml]   [2021]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 3/3] sched: Use cpu_dying() to fix balance_push vs hotplug-rollback
On Thu, Mar 11, 2021 at 03:13:04PM +0000, Valentin Schneider wrote:

> > #ifdef CONFIG_SCHED_SMT
> > /*
> > * When going down, decrement the number of cores with SMT present.
>
> > @@ -8206,7 +8212,7 @@ void __init sched_init(void)
> > rq->sd = NULL;
> > rq->rd = NULL;
> > rq->cpu_capacity = rq->cpu_capacity_orig = SCHED_CAPACITY_SCALE;
> > - rq->balance_callback = NULL;
> > + rq->balance_callback = &balance_push_callback;
> > rq->active_balance = 0;
> > rq->next_balance = jiffies;
> > rq->push_cpu = 0;
> > @@ -8253,6 +8259,7 @@ void __init sched_init(void)
> >
> > #ifdef CONFIG_SMP
> > idle_thread_set_boot_cpu();
> > + balance_push_set(smp_processor_id(), false);
> > #endif
> > init_sched_fair_class();
> >
>
> I don't get what these two changes do - the end result is the same as
> before, no?

IIRC the idea was to initialize the offline CPUs to the same state as if
they'd been offlined.

\
 
 \ /
  Last update: 2021-03-11 17:45    [W:0.141 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site