[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87k0k82dzq.ffs@tglx>
Date: Thu, 26 Aug 2021 21:38:17 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Tao Zhou <tao.zhou@...ux.dev>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
linux-kernel@...r.kernel.org, tao.zhou@...ux.dev
Cc: 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>
Subject: Re: [PATCH] sched: Fix get_push_task() vs migrate_disable()
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...
Thanks,
tglx
Powered by blists - more mailing lists