public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tommaso Cucinotta <tommaso.cucinotta@sssup.it>
To: Raistlin <raistlin@linux.it>
Cc: Jamie Lokier <jamie@shareable.org>,
	Peter Zijlstra <peterz@infradead.org>,
	sen wang <wangsen.linux@gmail.com>,
	mingo@elte.hu, akpm@linux-foundation.org, kernel@kolivas.org,
	npiggin@suse.de, arjan@infradead.org,
	linux-arm-kernel@lists.arm.linux.org.uk,
	linux-kernel@vger.kernel.org
Subject: Re: report a bug about sched_rt
Date: Sat, 25 Jul 2009 16:58:14 +0200	[thread overview]
Message-ID: <4A6B1D86.6060209@sssup.it> (raw)
In-Reply-To: <1248525201.8429.113.camel@Palantir>

Hi all,

Raistlin ha scritto:
>> For simple things like "try to keep the buffer to my DVD writer full"
>> (no I don't know how much CPU that requires - it's a kind of "best
>> effort but try very hard!"), it would be quite useful to have
>> something like RT-bandwidth which grants a certain percentage of time
>> as an RT task, and effectively downgrades it to SCHED_OTHER when that
>> time is exceeded to permit some fairness with the rest of the system
> Well, agree, again. If you want something very useful, you need the
> combination of the two: user space techniques and kernel space support.
>   
I didn't follow the entire discussion, however I'd like to add a 
comment, if it may be of any help. What is useful actually depends on 
the usage scenario and its requirements, comprising for example 
real-time and security requirements. On one hand, giving a real-time 
task the opportunity to keep running even if its budget is exhausted may 
be of course useful for the real-time task. In fact, in the real-time 
literature, you can find the term "soft reservations" to denote those 
real-time scheduling mechanisms that have such a property (and still 
preserve theoretical schedulability), with various different ways of 
distributing the spare capacity on the real-time tasks. On a GPOS like 
Linux, it may also be useful to "downgrade" a RT task to SCHED_OTHER 
when its budget is exhausted. In fact, in the AQuoSA EDF-based scheduler 
[academic], if the flag "SOFT_SERVER" is specified when creating a 
server, this is exactly what happens :-). On a related note, in the 
POSIX SPORADIC_SERVER (and e.g., its implementation by Dario Faggioli) 
there is a "low priority" field specifying the priority at which the 
task should run when the budget is exhausted).
However, if you depart from the traditional "embedded" context (i.e., 
for industrial control), switching for example to a "multi-user server" 
context, then a task "triggering" the throttling might not constitute 
necessarily a system bug that "needs a reboot", but it may simply be due 
to an application trying to over-use the system as compared to how much 
it is supposed to use it. Imagine a "pay-per-compute" context in which 
the share of a server is granted to a user (i.e., to a VM). Then, a 
provider would not necessarily want to grant a user more computation 
capability than the user has paid for. In fact, in the AQuoSA scheduler 
[again, academic], an access-control model exists by which the sys-admin 
may decide what users (and user groups) are authorized to access the 
"SOFT_SERVER" facility (i.e., real-time reservations for "gold" users 
might be allowed to be soft, but the ones for "bronze" users might not).

Therefore, IMHO there is no "silver bullet", but what behavior is best 
depends on the security requirements that may be in-place. Access to the 
"soft server" mentioned above is just an example, but plenty of other 
issues may arise, including: maximum system capacity that users may be 
authorized to occupy, maximum RT server periods that users may be 
authorized to use (for not starving the background OS for too much), 
minimum RT server period (for not causing too much scheduling overhead), 
etc... A more detailed discussion about security requirements arising 
when granting real-time facilities to unprivileged users on a GPOS may 
be found in [1], in case anyone is interested.

Regards,

  T.

[1] Tommaso Cucinotta "Access Control for Adaptive Reservations on 
Multi-User Systems", in Proceedings of the 14th IEEE Real-Time and 
Embedded Technology and Applications Symposium (RTAS 2008), St. Louis, 
MO, United States, April 2008, available at: 
http://feanor.sssup.it/~tommaso/publications/RTAS-2008.pdf

-- 
Tommaso Cucinotta, Computer Engineering PhD, Researcher
ReTiS Lab, Scuola Superiore Sant'Anna, Pisa, Italy
Tel +39 050 882 024, Fax +39 050 882 003
http://feanor.sssup.it/~tommaso


  reply	other threads:[~2009-07-25 14:58 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-24 10:57 report a bug about sched_rt sen wang
2009-07-24 12:14 ` Peter Zijlstra
2009-07-24 13:04   ` sen wang
2009-07-24 13:14     ` Peter Zijlstra
2009-07-24 13:26       ` sen wang
2009-07-24 13:33         ` Peter Zijlstra
2009-07-24 13:44           ` sen wang
2009-07-24 13:54             ` Peter Zijlstra
2009-07-24 14:04               ` sen wang
2009-07-24 14:48                 ` Peter Zijlstra
2009-07-24 14:53                   ` sen wang
2009-07-24 15:07                   ` sen wang
2009-07-24 15:24                     ` Peter Zijlstra
2009-07-24 15:43                       ` sen wang
2009-07-24 15:34                     ` Thomas Gleixner
2009-07-25 11:12                     ` Raistlin
2009-07-24 14:24               ` sen wang
2009-07-24 14:48                 ` Peter Zijlstra
2009-07-24 15:02                   ` sen wang
2009-07-24 15:40                   ` Jamie Lokier
2009-07-24 16:01                     ` Peter Zijlstra
2009-07-24 23:30                       ` Jamie Lokier
2009-07-25  5:22                         ` Bill Gatliff
2009-07-25 22:48                           ` Jamie Lokier
2009-07-26  2:44                             ` Bill Gatliff
2009-07-26 19:03                               ` Jamie Lokier
2009-07-27 10:45                                 ` Peter Zijlstra
2009-07-27 13:35                                 ` Bill Gatliff
2009-07-25 12:33                         ` Raistlin
2009-07-25 14:58                           ` Tommaso Cucinotta [this message]
2009-07-25 12:19                       ` Raistlin
2009-07-25 22:54                         ` Jamie Lokier
2009-07-25 23:24                           ` Tommaso Cucinotta
2009-07-25 11:10         ` Raistlin
     [not found]           ` <454c71700907250429i1c77658bt6d65b02f08a29f4a@mail.gmail.com>
2009-07-25 23:01             ` Jamie Lokier
2009-07-24 14:28 ` Arjan van de Ven
2009-07-26  3:55   ` sen wang

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=4A6B1D86.6060209@sssup.it \
    --to=tommaso.cucinotta@sssup.it \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=jamie@shareable.org \
    --cc=kernel@kolivas.org \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=npiggin@suse.de \
    --cc=peterz@infradead.org \
    --cc=raistlin@linux.it \
    --cc=wangsen.linux@gmail.com \
    /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