From: Juri Lelli <juri.lelli@gmail.com>
To: luca abeni <luca.abeni@santannapisa.it>
Cc: Tim Blechmann <tim@klingt.org>,
Daniel Bristot de Oliveira <daniel@bristot.me>,
linux-rt-users@vger.kernel.org,
Tommaso Cucinotta <tommaso.cucinotta@santannapisa.it>
Subject: Re: SCHED_DEADLINE as user
Date: Thu, 23 Aug 2018 14:37:39 +0200 [thread overview]
Message-ID: <20180823123739.GC31443@localhost.localdomain> (raw)
In-Reply-To: <20180823124340.765632d8@luca64>
On 23/08/18 12:43, luca abeni wrote:
> On Thu, 23 Aug 2018 12:23:50 +0200
> Juri Lelli <juri.lelli@gmail.com> wrote:
[...]
> > But then what is a sane inheritance mechanism?
>
> In my understanding (please correct me if I am wrong), this is an
> orthogonal issue: if I understand well, the issue preventing non-root
> usage of SCHED_DEADLINE is that a task inheriting a dl entity is not
> throttled (when the current runtime rrives to 0, the deadline is
> postponed, but the task stays schedulable). So, I think that removing
> this behaviour should allow to use SCHED_DEADLINE without starving
> other tasks...
Right, potential starvation would be gone...
> Then, there is the issue about the deadline and runtime to inherit. And
> I agree that this is important (and the solution is not easy), but you
> have this issue even if you use the current "dl_boosted" behaviour...
> No?
... but, while it's true that current inheritance has problems w/ o w/o
boosting behaviour, I wonder if the problem might be more painful for a
normal user that it's still under runtime enforcement. Disabling
enforcement seems to hide a bit the fact that we need proper
inheritance. :-(
> > Walk the chain and find
> > the next potential deadline to inherit for the current boosted (still
> > runtime enforced) task before throttling it? Not sure it's going to be
> > any easier than the proxy solution. :-/
>
> Right; this is not easy... But I think it is not related with the issue
> we are discussing (if I understand this email thread well). Yes, it has
> to be fixed, but it does not prevent non-root usage. Or am I missing
> something?
It depends on how bad we think it's what I said above I guess.
> > > 2) Implement some mechanism to limit the amount of dl bandwidth a
> > > user can allocate to itself (I think the cgroup-based approach we
> > > discussed some time ago should be OK... If I remember well, you
> > > even had a patch implementing it :)
> >
> > I think most (all?) distributions today run with CONFIG_RT_GROUP_SCHED
> > disabled, we should also think about a solution that doesn't rely on
> > that interface.
>
> I guess CONFIG_RT_GROUP_SCHED is often disabled because it ends up
> changing the "traditional" SCHED_{RR/FIFO} behaviour. So, maybe the
> solution is to have a different dl_{runtime,period} interface in
> control groups (enabled by CONFIG_DL_GROUP_SCHED :).
> CONFIG_DL_GROUP_SCHED does not change the scheduling behaviour, but
> only the admission test... So, enabling it could be safer than enabling
> CONFIG_RT_GROUP_SCHED.
Not sure if adding yet another config switch is acceptable. FWIW, I'd
prefer not to add it, also looking back at all the problems RT_GROUP_
SCHED seems to pose/have posed, but if turns to be the only option..
> > Maybe the existing system wide sched_rt_{period,
> > runtime}_us are enough?
>
> I do not know... A cgroup-based interface looks more powerful (and not
> so difficult to implement... :), and would allow the sysadmin to decide
> which users can use SCHED_DEADLINE, how much SCHED_DEADLINE bandwidth
> can each user/group use, etc...
How about extending PAM limits instead? It looks like it's what (e.g.)
audio users rely on already [1]. It is maybe possible to add dlruntime,
dlperiod, dldeadline parameters in there?
1 - https://fedoraproject.org/wiki/JACK_Audio_Connection_Kit#Running_Jack_in_Realtime_mode
next prev parent reply other threads:[~2018-08-23 16:07 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-15 6:08 SCHED_DEADLINE as user Tim Blechmann
2018-08-15 8:21 ` Daniel Bristot de Oliveira
2018-08-17 9:51 ` Juri Lelli
2018-08-17 10:08 ` Tim Blechmann
2018-08-17 10:28 ` Juri Lelli
[not found] ` <513fd544-bc51-7ea6-8b94-983d28922a66@klingt.org>
2018-08-20 8:54 ` Juri Lelli
2018-08-20 11:54 ` Tim Blechmann
2018-08-20 12:38 ` Daniel Bristot de Oliveira
2018-08-20 13:55 ` Tim Blechmann
[not found] ` <e207a65d-b1af-3fb1-8802-d1c05c0a9118@bristot.me>
[not found] ` <05fbd5a4-f354-e084-cf40-8488548d7cb1@klingt.org>
2018-08-21 6:55 ` Tommaso Cucinotta
2018-08-21 7:38 ` Juri Lelli
2018-08-22 8:49 ` Juri Lelli
2018-08-21 7:17 ` Tommaso Cucinotta
2018-08-21 7:59 ` Tim Blechmann
2018-08-23 9:56 ` luca abeni
2018-08-23 10:23 ` Juri Lelli
2018-08-23 10:43 ` luca abeni
2018-08-23 12:37 ` Juri Lelli [this message]
2018-08-23 12:58 ` luca abeni
2018-08-23 13:00 ` luca abeni
2018-08-23 13:09 ` Juri Lelli
2018-08-23 13:30 ` luca abeni
2018-08-23 13:45 ` Gene Heskett
2018-08-23 16:01 ` Chris Friesen
2018-08-23 18:07 ` Gene Heskett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180823123739.GC31443@localhost.localdomain \
--to=juri.lelli@gmail.com \
--cc=daniel@bristot.me \
--cc=linux-rt-users@vger.kernel.org \
--cc=luca.abeni@santannapisa.it \
--cc=tim@klingt.org \
--cc=tommaso.cucinotta@santannapisa.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).