lkml.org 
[lkml]   [2020]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH 07/13] sched: Add core wide task selection and scheduling.
    On Thu, Apr 16, 2020 at 04:32:28PM -0700, Tim Chen wrote:
    >
    >
    > On 4/14/20 6:35 AM, Peter Zijlstra wrote:
    > > On Wed, Mar 04, 2020 at 04:59:57PM +0000, vpillai wrote:
    > >> +static struct task_struct *
    > >> +pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
    > >> +{
    > >> + struct task_struct *next, *max = NULL;
    > >> + const struct sched_class *class;
    > >> + const struct cpumask *smt_mask;
    > >> + int i, j, cpu;
    > >> + bool need_sync = false;
    > >
    > > AFAICT that assignment is superfluous. Also, you violated the inverse
    > > x-mas tree.
    > >
    > >> +
    > >> + cpu = cpu_of(rq);
    > >> + if (cpu_is_offline(cpu))
    > >> + return idle_sched_class.pick_next_task(rq);
    > >
    > > Are we actually hitting this one?
    > >
    >
    > I did hit this race when I was testing taking cpu offline and online,
    > which prompted the check of cpu being offline.

    This is the schedule from the stop task to the idle task I presume,
    there should really not be any other. And at that point the rq had
    better be empty, so why didn't the normal task selection work?

    \
     
     \ /
      Last update: 2020-04-17 12:58    [W:4.102 / U:0.252 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site