All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tommaso Cucinotta <tommaso.cucinotta@santannapisa.it>
To: Tim Blechmann <tim@klingt.org>,
	Daniel Bristot de Oliveira <daniel@bristot.me>,
	Juri Lelli <juri.lelli@gmail.com>
Cc: linux-rt-users@vger.kernel.org,
	Luca Abeni <luca.abeni@santannapisa.it>,
	Alessio Balsini <alessio.balsini@santannapisa.it>
Subject: Re: SCHED_DEADLINE as user
Date: Tue, 21 Aug 2018 08:55:18 +0200	[thread overview]
Message-ID: <cc32702c-b0e0-86e0-0382-3b266d382771@santannapisa.it> (raw)
In-Reply-To: <05fbd5a4-f354-e084-cf40-8488548d7cb1@klingt.org>

Hi all,

+cc-ing Alessio, who has been working on this just recently on Android (will tell more answering on a different msg).

On 20/08/2018 18:45, Tim Blechmann wrote:
> the mach API also has this notion of "period == 0", but apart from that it's quite similar. 

in terms of API, XNU time constrained threads look like DEADLINE, however in terms of kernel behavior/implementation 
behind that, it's something completely different: last time I had a glance at this, it was .... ehm .... probably just 
during that old Linux Audio Conference (LAC) back in 2011, where the take away was: 1) in the kernel there's nothing 
like the CBS or deadline-based scheduling, but just a heuristic boosting a bit more those tasks, accompanied by usual 
heuristics to de-boost in case the task becomes CPU-intensive (similar to CFS heuristics for interactive-vs-batch); 2) 
the only user of that API seemed to be some sound daemon on OS-X, that had an almost random value set as "runtime", 
accompanied by a comment "this just works" ;-P

But, it was long ago, if anyone has a pointer to what XNU does with time constrained threads in these days....

> apart from that, i'm only missing two features:
>
> * using SCHED_DEADLINE from user applications is kind of a showstopper
> for me

unprivileged tasks using DEADLINE remained a request for quite a long time -- that old single-processor implementation 
(AQuoSA) we used long ago with JACK had such a feature, that was implementing this model:

   http://retis.sssup.it/~tommaso/papers/rtas08.php

the criticality for DEADLINE is that those tasks preempt RT99 ones, so even with controlled runtime/deadline boundaries....
> * a nicer glibc wrapper, that allows me to use pthreads rather than
> using `syscall`: it's all pretty easy to obtain the `tid` for a calling
> thread (gettid), but it seems to be impossible to obtain the `tid` from
>   `pthread_t` without some hacks which are way too dirty to share in
> public ...

well-known "pain" as well, thanks.

     T.

-- 
Tommaso Cucinotta, Computer Engineering PhD
Associate Professor at the Real-Time Systems Laboratory (ReTiS)
Scuola Superiore Sant'Anna, Pisa, Italy
http://retis.sssup.it/people/tommaso

  parent reply	other threads:[~2018-08-21 11:14 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 [this message]
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
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=cc32702c-b0e0-86e0-0382-3b266d382771@santannapisa.it \
    --to=tommaso.cucinotta@santannapisa.it \
    --cc=alessio.balsini@santannapisa.it \
    --cc=daniel@bristot.me \
    --cc=juri.lelli@gmail.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=luca.abeni@santannapisa.it \
    --cc=tim@klingt.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.