lkml.org 
[lkml]   [2020]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH 09/16] sched/fair: core wide cfs task priority comparison(Internet mail)
On Fri, 24 Jul 2020 at 15:17, Aaron Lu <aaron.lwe@gmail.com> wrote:
>
> On Wed, Jul 22, 2020 at 12:23:44AM +0000, benbjiang(蒋彪) wrote:
> >
> >
> > > +/*
> > > + * This function takes care of adjusting the min_vruntime of siblings of
> > > + * a core during coresched enable/disable.
> > > + * This is called in stop machine context so no need to take the rq lock.
> > Hi,
> >
> > IMHO, it seems that stop machine context cannot guarantee race free. The param *cpu* maybe not *this_cpu*, rq lock should be taken even in stop machine context, and irq should be disabled too, to avoid potential races with other contexts.
> >
>
> In stop machine context, all CPUs except the active ones are spinning
> with irq disabled and in this invocation of stop_machine(), only one
> CPU is active so I don't think race is possible.
You're right, stop_machine provides much more protection than stop_*_cpu.
Thanks for the explanation.

Regards,
Jiang

\
 
 \ /
  Last update: 2020-07-24 14:10    [W:0.128 / U:1.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site