lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMA88Tp0x6Mrs9gaKeRJ5L7B1VVjgDB4oYBPx9+bpF=NFdX-9g@mail.gmail.com>
Date:   Fri, 1 Jul 2022 15:15:18 +0800
From:   Schspa Shi <schspa@...il.com>
To:     Valentin Schneider <vschneid@...hat.com>
Cc:     mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, dietmar.eggemann@....com,
        rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
        bristot@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched: fix bad task migration for rt tasks

Valentin Schneider <vschneid@...hat.com> writes:

> On 24/06/22 02:29, Schspa Shi wrote:
>> @@ -1998,12 +1998,15 @@ static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq)
>>                       * the mean time, task could have
>>                       * migrated already or had its affinity changed.
>>                       * Also make sure that it wasn't scheduled on its rq.
>> +                     * It is possible the task has running for a while,
>> +                     * And we check task migration disable flag again.
>>                       */
>>                      if (unlikely(task_rq(task) != rq ||
>>                                   !cpumask_test_cpu(lowest_rq->cpu, &task->cpus_mask) ||
>
> cf. 95158a89dd50 ("sched,rt: Use the full cpumask for balancing"), this
> made sense to me back then but not so much anymore... Shouldn't this have
> remained a ->cpus_ptr check?
>

This cpus_ptr check seems to be somehow same with is_migration_disabled(task).

> I'm going to revisit that commit, I evicted too much of it.
>

Any further progress on this?

We have tested this patch for a weak, It seems the problems have gone
(It will reproduce 2-3 times per week usually).

I have send a V2 patch too, it task the other case into consideration
(Going to retry to push the current running task on this CPU away,
instead doing nothing for this migrate disabled task.).

Link: https://lore.kernel.org/all/20220627154051.92599-1-schspa@gmail.com/


>>                                   task_running(rq, task) ||
>>                                   !rt_task(task) ||
>> -                                 !task_on_rq_queued(task))) {
>> +                                 !task_on_rq_queued(task) ||
>> +                                 is_migration_disabled(task))) {
>>
>>                              double_unlock_balance(rq, lowest_rq);
>>                              lowest_rq = NULL;
>> --
>> 2.24.3 (Apple Git-128)

-- 
Schspa Shi
BRs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ