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-next>] [day] [month] [year] [list]
Message-ID: <3000986a52f2c961177c95289df69535@posteo.de>
Date:   Tue, 14 Jan 2020 10:44:09 +0100
From:   stanner@...teo.de
To:     Juri Lelli <juri.lelli@...hat.com>
Cc:     linux-kernel@...r.kernel.org, Hagen Pfeifer <hagen@...u.net>,
        mingo@...hat.com, peterz@...radead.org, vincent.guittot@...aro.org,
        dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
        mgorman@...e.de
Subject: Re: SCHED_DEADLINE with CPU affinity



Am 13.01.2020 10:22 schrieb Juri Lelli:
> Hi,
> 
> Sorry for the delay in repling (Xmas + catching-up w/ emails).

No worries

>> I fear I have not understood quite well yet why this
>> "workaround" leads to (presumably) the same results as set_affinity
>> would. From what I have read, I understand it as follows: For
>> sched_dead, admission control tries to guarantee that the requested
>> policy can be executed. To do so, it analyzes the current workload
>> situation, taking especially the number of cores into account.
>> 
>> Now, with a pre-configured set, the kernel knows which tasks will run
>> on which core, therefore it's able to judge wether a process can be
>> deadline scheduled or not. But when using the default way, you could
>> start your processes as SCHED_OTHER, set SCHED_DEADLINE as policy and
>> later many of them could suddenly call set_affinity, desiring to run 
>> on
>> the same core, therefore provoking collisions.
> 
> But setting affinity would still have to pass admission control, and
> should fail in the case you are describing (IIUC).
> 
> https://elixir.bootlin.com/linux/latest/source/kernel/sched/core.c#L5433

Well, no, that's not what I meant.
I understand that the kernel currently rejects the combination of 
set_affinity and
sched_setattr.
My question, basically is: Why does it work with exclusive cpu-sets?

As I wrote above, I assume that the difference is that the kernel knows 
which
programs will run on which core beforehand and therefore can check the
rules of admission control, whereas without exclusive cpu_sets it could 
happen
any time that certain (other) deadline applications decide to switch 
cores manually,
causing collisions with a deadline task already running on this core.

You originally wrote that this solution is "currently" required; that's 
why assume that
in theory the admission control check could also be done dynamically 
when
sched_setattr or set_affinity are called (after each other, without 
exclusive cpu sets).

Have I been clear enough now? Basically I want to know why 
cpusets+sched_deadline
works whereas set_affinity+sched_deadline is rejected, although both 
seem to lead
to the same result.

P.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ