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: <CAMA88Tre3iVu+Dsxv4W_eWY2TrTPR-j_hfXVzQPCEynnCbgBeg@mail.gmail.com>
Date:   Wed, 13 Jul 2022 20:24:27 +0800
From:   Schspa Shi <schspa@...il.com>
To:     Dietmar Eggemann <dietmar.eggemann@....com>
Cc:     mingo@...hat.com, Peter Zijlstra <peterz@...radead.org>,
        juri.lelli@...hat.com, vincent.guittot@...aro.org,
        Steven Rostedt <rostedt@...dmis.org>,
        Benjamin Segall <bsegall@...gle.com>, mgorman@...e.de,
        bristot@...hat.com, Valentin Schneider <vschneid@...hat.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6 2/2] sched/rt: Trying to push current task when target
 disable migrating

Dietmar Eggemann <dietmar.eggemann@....com> writes:

> On 12/07/2022 17:05, Schspa Shi wrote:
>
> [...]
>
>> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
>> index 7bd3e6ecbe45e..e2d7b085a93d9 100644
>> --- a/kernel/sched/rt.c
>> +++ b/kernel/sched/rt.c
>> @@ -2136,6 +2136,12 @@ static int push_rt_task(struct rq *rq, bool pull)
>>               */
>>              task = pick_next_pushable_task(rq);
>>              if (task == next_task) {
>> +                    /*
>> +                     * If next task has now disabled migrating, see if we
>> +                     * can push the current task.
>> +                     */
>> +                    if (unlikely(is_migration_disabled(task)))
>
> Doesn't this need a `put_task_struct(next_task)`?

Thanks for the review, I missed this.

>
>> +                            goto retry;
>>                      /*
>>                       * The task hasn't migrated, and is still the next
>>                       * eligible task, but we failed to find a run-queue
>
> Why not introduce in push_dl_task() as well?

OK, push_dl_task() needs this too, I missed it.

I will upload a new patch version to fix it.


-- 
BRs
Schspa Shi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ