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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231129101710.GB30650@noisy.programming.kicks-ass.net>
Date:   Wed, 29 Nov 2023 11:17:10 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Benjamin Tang <tangsong8264@...il.com>
Cc:     Ingo Molnar <mingo@...hat.com>, 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>,
        Valentin Schneider <vschneid@...hat.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC] Core Scheduling unnecessary force idle?

On Wed, Nov 29, 2023 at 04:53:35PM +0800, Benjamin Tang wrote:
> When I'm reading the code related to "core scheduling", I have a question.
> 
> Say the RQs in a particular core look like this:
> Let CFS1 and CFS4 be 2 untagged CFS tasks.
> Let CFS2 and CFS3 be 2 untagged CFS tasks.
> 
>          rq0                      rq1
>     CFS1(no tag)     CFS3(tagged)
>     CFS2(tagged)    CFS4(no tag)
> 
> Say schedule() runs on rq0. In the core-wide pick logic, if I'm not
> mistaken,
> the end result of the selection will be (say prio(CFS1) > prio(CFS3)):
> 
>          rq0                 rq1
>     CFS1(no tag)    IDLE
> 
> Why not consider trying to find untagged tasks for rq1 here?
> Is it because it seems less fair, or are there other considerations?
> 
> I would be very grateful if someone could give me some suggestions.
> Thanks!

Because it's expensive to unconditionally track the untagged tasks. I
suppose it could be fixed by iterating the task-set when we
enable/disable core-scheduling, but that's going to be somewhat painful.

A work-around would be to always tag everything, eg. have an explicit
'rest' tag.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ