[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YSgbfyLdkEApqsoI@geo.homenetwork>
Date: Fri, 27 Aug 2021 06:53:51 +0800
From: Tao Zhou <tao.zhou@...ux.dev>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
linux-kernel@...r.kernel.org, tao.zhou@...ux.dev
Subject: Re: [PATCH] sched: Fix get_push_task() vs migrate_disable()
Hi Thomas,
On Thu, Aug 26, 2021 at 09:38:17PM +0200, Thomas Gleixner wrote:
> Tao,
>
> On Fri, Aug 27 2021 at 00:24, Tao Zhou wrote:
> > On Thu, Aug 26, 2021 at 03:37:38PM +0200, Sebastian Andrzej Siewior wrote:
> >> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> >> index e205b63d6db07..32a4945730a9b 100644
> >> --- a/kernel/sched/sched.h
> >> +++ b/kernel/sched/sched.h
> >> @@ -2259,6 +2259,9 @@ static inline struct task_struct *get_push_task(struct rq *rq)
> >> if (p->nr_cpus_allowed == 1)
> >> return NULL;
> >>
> >> + if (p->migration_disabled)
> >> + return NULL;
> >
> > Not much I can restore here..
> >
> > Is is_migration_disabled(p) be more correct to check migration
> > disable.
>
> Kinda, but it's not an issue here because get_push_task() is only available when
> CONFIG_SMP=y which makes p->migration_disabled available as well.
>
> > And get_push_task() being called in pull_rt_task() has checked migration
> > disable first and then call get_push_task(). That means this check in
> > get_push_task() in patch is a second repeatly check.
>
> No. The checks are for two different tasks...
Aha, yes. I lost here. Thanks for your reply.
> Thanks,
>
> tglx
Thanks,
Tao
Powered by blists - more mailing lists